Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Trigger question?

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2001-12-16 : 11:57:18
Raymond writes "Hi SQL Team,

I have this question hope you can answer me:

I hava a table which is been updata by few different Stored Procedures, lately I have problems with some of the records that been insert into the table, I don't know which Stored Procedures is doing that, Is there any way that I can find out with a Trigger when there is an Insert into the table, and find out which Stored Procudures just did that?


Regards

Raymond"

robvolk
Most Valuable Yak

15732 Posts

Posted - 2001-12-16 : 14:30:20
Take a look in Books Online under "system functions". Things like APP_NAME, HOST_ID, etc. *might* help you, but only if you execute your SPs under specific conditions.

If anybody can run any SP at any time, then you'll have to rewrite them to set some kind of flag or other setting that identifies the originating SP to the trigger. Triggers cannot accept parameters, so it would have to be a system setting or a separate table that the trigger can query.

Go to Top of Page
   

- Advertisement -