views:

20

answers:

1

I have a requirement to copy whatever data is getting inserted or updated to a log table to show who updated and when. I was thinking of using triggers for the same. The reason being the insert needed not be only stored procedure but can also be packages. Can I use extended events for the same ?.

+1  A: 

You have a much better choice than Triggers when using SQL Server 2008. Take a look at Change Data Capture.

This might help get you started:

http://www.databasejournal.com/features/mssql/article.php/3720361/Microsoft-SQL-Server-2008----Change-Data-Capture--Part-I.htm
Randy Minder

related questions