Get the user name and date time who modified or inserted data
-
Hi All, I have a database in which most of the tables have Created by, modified by, Create Date and Modified date columns, for some child tables we don't have. The problem is developers are performing DML operations on those tables like insert with some inappropriate values or update without using modified by column. Then when they update it incorrectly we are unable to track who modified it. Is there any mechanism for me from Sql Scripts or any other who made those changes, so that I can track that out and let him/her know what incorrect change they made. Any help a code snippet, a link, a small script or even suggestion helps me. Thanks in advance.
Thanks, Abdul Aleem "There is already enough hatred in the world lets spread love, compassion and affection."
-
Hi All, I have a database in which most of the tables have Created by, modified by, Create Date and Modified date columns, for some child tables we don't have. The problem is developers are performing DML operations on those tables like insert with some inappropriate values or update without using modified by column. Then when they update it incorrectly we are unable to track who modified it. Is there any mechanism for me from Sql Scripts or any other who made those changes, so that I can track that out and let him/her know what incorrect change they made. Any help a code snippet, a link, a small script or even suggestion helps me. Thanks in advance.
Thanks, Abdul Aleem "There is already enough hatred in the world lets spread love, compassion and affection."
A quick Google for "sql audit trail" came up with Audit Trail Generator for Microsoft SQL[^] right here on CP. If you need to know who's messing with your data, how and when, an audit trail is the way to go. Cheers, Peter
Software rusts. Simon Stephenson, ca 1994. So does this signature. me, 2012
-
Hi All, I have a database in which most of the tables have Created by, modified by, Create Date and Modified date columns, for some child tables we don't have. The problem is developers are performing DML operations on those tables like insert with some inappropriate values or update without using modified by column. Then when they update it incorrectly we are unable to track who modified it. Is there any mechanism for me from Sql Scripts or any other who made those changes, so that I can track that out and let him/her know what incorrect change they made. Any help a code snippet, a link, a small script or even suggestion helps me. Thanks in advance.
Thanks, Abdul Aleem "There is already enough hatred in the world lets spread love, compassion and affection."
You should enforce INSERT/UPDATE triggers for these auditing purposes. You cannot reply on the developers to implement this.