SQL Server 2016 temporal tables #3 - audit + system-versioned temporal tables = who changed somethi
The SQL Server auditing features are there to be able to log access to server and database objects and subsequently answer questions like "Who did what to which?" And also ensure that the audit trail cannot be changed by a user.
But this feature does not help answering questions like "What was the data changed from?" This is why we traditionally have implemented change log tables or shadow tables (basically tables with the same schema and with additional attributes like change_date and change_type) on important tables as well as triggers firing on update/deletes.
SQL Server 2016 system-versioned temporal tables can do that without all the manual work and without the trigger overhead. Furthermore their content cannot be tampered with by a DBA, just like the case with the SQL Audit trail.
So with the combination of SQL Audit and system-versioned temporal tables, we can now answer "who did what to which?" and for DML statements, also "what was the data changed from?". And the answers to the two questions cannot be altered by a dark wizard (well, maybe by him. But not normal users including DBAs).
There is a third type of question we often also hear: "what data did they see?" This is still hard to implement, and must as far as I know be implemented in application logic. But that's another story for another day.