views:

64

answers:

1

This is in reference to this question here:

http://stackoverflow.com/questions/546781/check-contraint-bypassing-catch-block-in-distributed-transaction

Apparently in that distributed transaction scenario, an "attention event" is sent to our sql server and is destroying the connection without giving us the opportunity to log the error in a CATCH block.

So how can we log "attention" events? We can't have things silently failing in the background! Is there a way to log these events?

+1  A: 

Not from within the connection, unfortunately. You have to catch it at the level above the database.

casperOne
Hi casper, thanks for your help so far. unfortunately, we're not getting the error like you indicated in the other post. We'd like to see "CHECK CONSTRAINT XYZ violated", not "Error". Any clues for us?
Clyde
@Clyde: I don't know that DTC is going to give you much more than that, unfortunately.
casperOne