monitor data changes

  • How do you return all the data changes made to a table (inserts, updates, deletes) the past 2 weeks including datetime and who made the changes?

  • MinhL7 - Sunday, November 26, 2017 5:16 PM

    How do you return all the data changes made to a table (inserts, updates, deletes) the past 2 weeks including datetime and who made the changes?

    Unless the table in question has triggers defined on it which write such details to an audit table of some description, you cannot do this.

    If you haven't even tried to resolve your issue, please don't expect the hard-working volunteers here to waste their time providing links to answers which you could easily have found yourself.

  • MinhL7 - Sunday, November 26, 2017 5:16 PM

    How do you return all the data changes made to a table (inserts, updates, deletes) the past 2 weeks including datetime and who made the changes?

    You could look at enabling CDC (Change Data Capture) on the tables, from SQL 2008 onwards.
    Have a look at this link:
    https://docs.microsoft.com/en-us/sql/relational-databases/track-changes/about-change-data-capture-sql-server

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

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