Hi Guys,
I've created a generic CLR Trigger that caters the Audit Trail of my SQL Tables. It is a generic trigger but it still needs to be attached to every table. My question is that is it possible to acquire the name of the Trigger that is currently being executed?
All triggers that were associated for each table were named the same as the table name. The purpose is to have a reference that will serve as the table name since there is no way to acquire the table name on DMLs'.
I'm thinking of calling a Stored Procedure within the CLR Trigger and passing it the @@ProcId so it can retrieve the name of the trigger.
Unfortunately, this doesn't seem to work.
Am I missing on something? or are there more elegant ways on how to do it?
Thanks in advance...
Music Rocks
www.musicreserve.blogspot.comSuccess is 1% Inspiration & 99% Perspiration
God Sometimes Delays His Help to Test Our Faith and Energize Our Prayers
Our Boat May Be Tossed While He Sleeps, But He Wakes Up Before it Sinks.