ninesided
ninesided

Reputation: 23273

what's the best way to implement logging during transactions in T-SQL?

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.

Upvotes: 2

Views: 489

Answers (1)

tvanfosson
tvanfosson

Reputation: 532605

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.

Upvotes: 2

Related Questions