I have a system-versioned table in sql server 2016. I want to store Modifier ID in its temporal (history) table while users are performing delete or update action on the table.
Is there any built-in solution by sql server 2016 to do that?
Temporal tables (also known as system-versioned temporal tables) are a database feature that brings built-in support for providing information about data stored in the table at any point in time, rather than only the data that is correct at the current moment in time.
BEGIN TRAN ---set system versioning to off ALTER TABLE [dbo]. [CompanyLocation] SET (SYSTEM_VERSIONING = OFF); ALTER TABLE [CompanyLocation] ADD Cntr INT IDENTITY (1,1); ALTER TABLE [dbo].
You can use Audit
Introduction to sql server 2008 audit
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With