SQLTeam.com | Weblogs | Forums

How to track user data changes in CDC?


hi all;
I use CDC to track data changes . but CDC track only data changes not who change data.
i know that the CDC track only data changes not who change data but i want to an idea to catch user change data .
i tried to put Host_Name() in CDC table but i found that the CDC tables fires always from server , it's mean the Host_Name() return server name not client server name,
i tried to put @@SPID in column default value in CDC table and i found the value is 102 for example put client is 75 for example.
i tried to use CONTEXT_INFO() put the same problem i found all information of server not client.
the CDC system is firing from server not from client server.
Any one have idea to catch user change data ??


try suser_name:



SQL Server provides two technique for the tracking of user data changes one is CDC and the next one is change tracking. To know more are about the CDC please go this article https://msdn.microsoft.com/en-us/library/bb933994.aspx


gbritton, it is the same result :frowning:

thanks jason_clark there is no new result :frowning:


why the post withdrawn by author ?