There's no such thing as a global variable in SQL Server.
So i had to do it differently.
More here
The most popular method of auditing data is with an
AFTER DELETE, INSERT, UPDATE trigger.
But what happens if you have a Rollback statement in your trigger if some condition is met?
More here