I want to implement a simple debug log, which consists of a table into which I insert insightful messages about the current state of a transaction. How do I stop inserts to this table being affected by rollbacks on the transaction that I'm trying to debug? In Oracle I can use PRAGMA AUTONOMOUS_TRANSACTION
to ensure that the inserts are done outside of the transaction, but what are my options in T-SQL? How do you implement logging in your shop?
NB: I'm not using SQL Server, I'm using Sybase 12.5.