I'm working on a legacy SQL Server application, with close to 3,000 tables and more than 10,000 stored procedures.
One of those stored procedures is deleting some needed data from a table. I don't know which one it is.
I created a trigger on the table which logs all deleted rows in another table, created just for debugging. It would be very helpful if the trigger could also log the name of the stored procedure which invoked it. Is such a thing possible in SQL Server 2008 R2 (v10.50)?
If not, is there any other information available from within a trigger which could help me identify why it was invoked?