|
Posted by Erland Sommarskog on 10/01/81 11:27
serge (sergea@nospam.ehmail.com) writes:
> Can you create an UPDATE TRIGGER and use some type
> of code to figure out which SP just updated the current table?
No. At least not without changing all stored procedure to write their
name somewhere. That can be done in a general way, as the global variable
@@procid holds the object id of the currently executing SQL module.
But there is no way to get the entire call stack. Definitely a missing
a feature in SQL Server.
> I tried to run SQL Profiler and i don't understand why i can't
> simply have the Profiler filter events only for the specific database id
> and the table's object id i chose?
The problem with Profiler is that if there are entries that do not
populate the columns you filter on, the NULL values pass the filter
and give you a lot of noise.
--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se
Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinfo/productdoc/2000/books.asp
Navigation:
[Reply to this message]
|