How to tell what invoked a trigger in SQL Server?

How to tell what invoked a trigger in SQL Server?

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)?

What is Chapter 11 of trigger identification and intervention?

Chapter 11 – Trigger Identification and Intervention | Adolescent Trauma Training Center (USC-ATTC)

What happens when a trigger re-requests the work?

Thus, the trigger re-requests the work, persists the request in an sobject, and even though the workflow will re-fire, the persisted sobject can be inspected on the second trigger re-fire and the dowork request skipped Now, what would you save in that sobject field?

Is there an exception in trigger.old?

Trigger.old contains a version of the objects before the specific update that fired the trigger. However, there is an exception.

What’s the difference between a trigger and a procedure?

Introduction to Triggers. However, procedures and triggers differ in the way that they are invoked. A procedure is explicitly run by a user, application, or trigger. Triggers are implicitly fired by Oracle when a triggering event occurs, no matter which user is connected or which application is being used.

How to get the stored procedure name from a trigger?

The trigger is coupled to the update, it has no relationship to the SP (which may not even exist). Stack traces are not available to you at that level. Not the answer you’re looking for?

When does Oracle implicitly fire a trigger in a procedure?

A procedure is explicitly run by a user, application, or trigger. Triggers are implicitly fired by Oracle when a triggering event occurs, no matter which user is connected or which application is being used.