locked
know what query updated my table RRS feed

  • Question

  • does the SQL-SERVER records the last job or query that updated the table?

    If yes, how do I know what query or job updated my table?

    Thursday, January 2, 2014 9:30 PM

Answers

  • The default trace does not track this kind of information.

    To track who and what performed changes to a table, you need to cater for this yourself. Possible options are audit triggers, SQL Trace and SQL Audit.


    Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se
    • Proposed as answer by Kalman Toth Friday, January 3, 2014 10:29 AM
    • Marked as answer by Fanny Liu Wednesday, January 8, 2014 7:16 AM
    Thursday, January 2, 2014 10:42 PM

All replies

  • No, not really. You may try to examine standard trace.

    For every expert, there is an equal and opposite expert. - Becker's Law


    My blog


    My TechNet articles

    Thursday, January 2, 2014 10:07 PM
  • The default trace does not track this kind of information.

    To track who and what performed changes to a table, you need to cater for this yourself. Possible options are audit triggers, SQL Trace and SQL Audit.


    Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se
    • Proposed as answer by Kalman Toth Friday, January 3, 2014 10:29 AM
    • Marked as answer by Fanny Liu Wednesday, January 8, 2014 7:16 AM
    Thursday, January 2, 2014 10:42 PM