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 2005 Forums
 SQL Server Administration (2005)
 Trigger logic Help

Author  Topic 

learntsql

524 Posts

Posted - 2009-12-18 : 05:40:41
Hi..
My requirement is
My Audit Table contains 20 columns and some stored procedures are depeded on this Table(performs some DML operations).
How can i capture from which stored procedure perticuler column is modifying the data.
simply how to capture recent information of column's data being changed from any stored procedure.
How to write trigger to do this
or is there any work around?
TIA

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2009-12-19 : 11:04:31
From the trigger's perspective, it won't know what stored procedure initiated the DML operation. Can't you modify the stored procedure to log to a small table so that you know which one it is?

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog

"Let's begin with the premise that everything you've done up until this point is wrong."
Go to Top of Page
   

- Advertisement -