November 26, 2017 at 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?
November 26, 2017 at 6:25 pm
MinhL7 - Sunday, November 26, 2017 5:16 PMHow 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.
The absence of evidence is not evidence of absence
- Martin Rees
The absence of consumable DDL, sample data and desired results is, however, evidence of the absence of my response
- Phil Parkin
November 27, 2017 at 4:13 am
MinhL7 - Sunday, November 26, 2017 5:16 PMHow 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