Way to monitor what tables are updated?

  • I'm not sure what forum would be best to post this in.  Does anyone know if there is a way to monitor what tables are updated when a script runs?  

    The trace utility shows me what stored procedures have executed, but doesn't indicate what tables are being updated or inserted into.   There's too many tables being updated, so a trigger is out. 

    Thanks...

  • Not sure if this will help but recently I did a trace on object permissions.  Baiscally I logged any object where permissions were checked.  This should include all of the tables that are written to.  Now it will also include any tables that are read from so may get more information there than you need.

    Kenneth Fisher

    Kenneth FisherI was once offered a wizards hat but it got in the way of my dunce cap.--------------------------------------------------------------------------------For better, quicker answers on T-SQL questions, click on the following... http://www.sqlservercentral.com/articles/Best+Practices/61537/[/url]For better answers on performance questions, click on the following... http://www.sqlservercentral.com/articles/SQLServerCentral/66909/[/url]Link to my Blog Post --> www.SQLStudies.com[/url]

  • quoteThere's too many tables being updated, so a trigger is out.

    Write a sproc to generate the trigger code you need to do this type of auditing on all of your tables.  You'll need to exclude Text, NText, and Image datatypes, but it can be done... shouldn't take that long, either.

    You can also turn on profiler with or without rollover or take the big plunge to become "C2 Audit compliant".

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

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

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