Logging availability in SQL Server 2000 SP4

  • 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

  • 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.

    John Rowan

    ======================================================
    ======================================================
    Forum Etiquette: How to post data/code on a forum to get the best help[/url] - by Jeff Moden

  • 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

  • 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. 

    John Rowan

    ======================================================
    ======================================================
    Forum Etiquette: How to post data/code on a forum to get the best help[/url] - by Jeff Moden

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply