![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hello, I've a problem where some data gets updated but I don't know which process (SP) is responsible for it (it's an old installation which I've taken over). Is it somehow possible to know which process/user/SP performs an update on a special table/column? I was thinking about to implement an update trigger but unfortunately I've no idea how to figure out the "parent process" which was responsible for the update. I'm using MS SQL Server 2000. Thanks Joerg |
#3
| |||
| |||
|
|
I've a problem where some data gets updated but I don't know which process (SP) is responsible for it (it's an old installation which I've taken over). Is it somehow possible to know which process/user/SP performs an update on a special table/column? |
|
I was thinking about to implement an update trigger but unfortunately I've no idea how to figure out the "parent process" which was responsible for the update. |
#4
| |||
| |||
|
|
This query: SELECT o.name, o2.name, c.name FROM sysobjects o JOIN sysdepends d ON o.id = d.id JOIN sysobjects o2 ON d.depid = o2.id JOIN syscolumns c ON d.depid = c.id AND d.depnumber = c.colid WHERE o2.name = 'yourtbl' AND c.name = 'yourcol' AND d.resultobj = 1 |
#5
| |||
| |||
|
|
I want to know at runtime who or what changes a value in a specific table,column,row. Problem is that it might not only a SP but a plain SQL statement or another trigger or ... ? |
|
I want to create an Update trigger to capture the old value, the new value and which process/user/sql command performed the update. So roughly spoken I'm looking for something like: create trigger getCaller on MyTable for update as --- problem how to figure out the caller who's responsible that the trigger is called select @caller = .?.?.?. --- insert into MyCallerTable select @caller, getdate(), * from deleted, inserted ... |
![]() |
| Thread Tools | |
| Display Modes | |
| |