November 30, 2005 at 11:07 am
Is there any type of SQL Server logging that can be turned on to log specific actions on a specific table? I want to be able to see when deletes are happening, and by whom.
Thanks!
Karri
November 30, 2005 at 11:47 am
There is not a logging feature in SQL Server 2000 that will accomplish what you are looking for. It sounds like you want to audit certain deletes? You may want to create an AuditDelete table and use the delete triggers on the tables you need to monitor to create audit records.
November 30, 2005 at 12:28 pm
If you don't go the trigger route, you can run traces, though you'll have to trace all statements and then parse out the deletes. Generally, though, if you need to keep track of this info, John's suggestion of triggers are the typical mechanism for implementation.
K. Brian Kelley
@kbriankelley
November 30, 2005 at 12:50 pm
Brian's suggestion of using profiler to trace SQL statements would be the optimal solution if you are looking for a short term solution to figure out who's deleting your data. Keep in mind that trace files can grow large so make sure you've got extra storage space.
Use the trigger method if you are in need of a long term auditing solution.
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply