Sample Header Ad - 728x90

track down which application / procedure / function modified the value of a column in a specific table

1 vote
1 answer
179 views
in our enterprise application, value in one column of a table is being modified at client side. This happen usually once in a week. i have verified in all stored procedures and other modules, value in that column is just inserted first time (when some request is generated through web app) but never updated again. so it seems quite strange. now i have created a temp table and a trigger to track the record when that column is updated, but my problem is i don't know how to track the stored Procedure or any other part of db / or application which is modifying that value. I have used HOST_NAME(), APP_NAME(), SUSER_NAME() in my trigger. these functions just return the machine IP, and db name "sa", and ".Net SQL client" things, but i need to know the actual SP / Trigger / function name which modify the value. i cant use CONTEXT_INFO() since i don't know the actual issue point. Any help from you experts, will be highly appreciated.
Asked by user104962 (11 rep)
Sep 2, 2016, 01:09 PM
Last activity: Dec 28, 2023, 05:16 PM