| | |
Logging Stored Procedure from Trigger
Please support our MS SQL advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Nov 2008
Posts: 1
Reputation:
Solved Threads: 0
I have an awkward problem. I'm debugging what I believe is a race condition in a legacy codebase. The issue involves a userID column being set to the wrong value. Essentially, one user's record will be non-deterministically reassigned to another user. The real problem is that this column is set from several different stored procedures, and there's no logging, so I don't even know where to start.
I was thinking of creating an update trigger on the column, and log the "to" and "from" values, but this doesn't really help me if I don't know what procedure's doing the update. Is there anyway to log the procedure doing the update from inside the trigger?
I was thinking of creating an update trigger on the column, and log the "to" and "from" values, but this doesn't really help me if I don't know what procedure's doing the update. Is there anyway to log the procedure doing the update from inside the trigger?
•
•
Join Date: Aug 2008
Posts: 1,160
Reputation:
Solved Threads: 137
you could use SQL Profiler and it will show you all queries being executed, it will save you a lot of work from creating new tables and triggers and show you all sql statements being ran
Custom Application & Software Development
www.houseshark.net
www.houseshark.net
![]() |
Other Threads in the MS SQL Forum
- Previous Thread: connecting to local host sql 2005 studio
- Next Thread: Autogenerated Primary Key.. Please Help !!
| Thread Tools | Search this Thread |






