Concerning SQL Server Change Data Capture, can you track the User who has made the change to the row/column data or is there anyway to extend CDC to allow this? I couldn't see anything in the documentation.
SQL Server Change Data Capture - Capture user who made the change
3.5k views Asked by garfbradaz At
2
There are 2 answers
0
On
You can create a new field where the user’s details, machine, time etc. are stored and updated after each change.
Also, there are third party tools you can use for users auditing – SQL Audit & Compliance manager. I’ve used both and you can’t go wrong with any of them. There are probably more tools like those out there.
You can't capture username with CDC..
You have to use Auditing to do so or if this is a one time request,you can query TLOG..
Below is the connect item requesting the same..
CDC : options to capture more data (username, date/time, etc)
You also can use triggers as per this article Playing with CDC in Katmai from Aaron Bertrand..
Create table :
create trigger: