问题
I would like to know if there are any features in MS SQL Server that will give me the opportunity to track movement of data between tables?
I am doing customer support on a database-driven application with hundreds of tables in one database. Data registered in the application goes through a series of stages, and when transitioning between these stages the data often moves from one table to another table.
I would like to get a better understanding of the underlying data model of the application, and therefore it would be helpful if there is any mechanism or other method to track inserts, updates, deletions or other movement in the database.
For example, if I register data in the application, then I would like to go to preferrably SQL Server Management Studio afterwards and get some kind of notification that new data has been inserted into table X. If I do changes to the data in the application I can go back to SQL Server Management Studio and see that data has been deleted from table X and added to table Y..
回答1:
You can read about:
SQL Server Audit,
Change Data Capture
You can also capture this by triggers, but it's not good at database level.
来源:https://stackoverflow.com/questions/38872789/track-changes-in-microsoft-sql-server-database