views:

228

answers:

1

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.

A: 

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.

tvanfosson
I'm not sure that your links work there, the URLs are both the same and it resolves to a description of global variables (at least for me). The advice on the other hand is spot on, sadly.
ninesided
Stupid frame-based web sites and their broken navigation. I fixed it by changing to a single link to the root of the document tree.
tvanfosson