Question

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.

Was it helpful?

Solution

Finally tracked down the Sybase manuals on line. According to the documents, it looks like your only way out is to log via RPC to an external log server.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top