Often law or organization policies require an application to track changes to certain table rows in a database. The changed data is often also viewable through some application page. Some common strategies exist to implementing these, such as database triggers, DAO query injects, SQL Server Change Data Capture...

Is there anything new related to this in SQL Server 2016?

  • Check this answer for temporal tables. Remember, depending on the changes, they can get quiet big.. so plan for disk space, autogrowth settings, etc
    – Kin Shah
    May 9 '16 at 14:28

Temporal tables are new and in all editions. They add a start and end time to rows and keeps a history of datachanges with some DDL to pull back changes.

It may be possible to stick into existing applications but has some limitations (eg no cascade deletes) and so is much more likely to be put in during design time so that developers don't need to roll their own anymore.

  • Temporal tables may not be best here, as I would like to see what was the previous value, and what is the new value. Also, there was a comment about the history table requiring cleaning. In my case the history/audit table may never be cleaned, unless archived in some other storage that can also be queried easily. May 9 '16 at 18:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.