|
Hi I am working on sqlserver 2005 and recently started facing a problem of unexpected changes in database tables. I have an employee table with a datetime column which holds date of birth of all the associates. Recently i the DOB of the employees is getting changed and when i enquired ...... everyone says that they have not touched the database neither from the UI or from backend. This is being happening since 4 months and am not able to know what exactly is happening on DB
Thought of writing triggers but dont know how to capture the values which i have mentioned. Thanks in advance Usha
(comments are locked)
|
|
A trigger would certainly help here. You could use an 'instead of' trigger to avoid the update and keep the data untouched or use an 'after' trigger Take some action after the update has been made. No example at the moment as I am on my phone.
(comments are locked)
|
If you are on SQL Server 08 and above (E.Edition or Dev Edition) you can use Auditing. or you can use custom audit triggers for that table capturing username and other details. Refer this simple blog for audit trigger.
(comments are locked)
|

