June 23, 2010 at 3:16 pm
One of our developers feels that invoking RAISERROR in a stored proc where XACT_ABORT is on should cause all open transactions to rollback. Is this correct?
TIA,
Barkigndog
P.S. To the best of my knowledge, RAISERROR is only for reporting errors and has no relationship to or impact on XACT_ABORT\transaction processing.
June 23, 2010 at 4:32 pm
there is a Connect article about how Raiserror does not work the same with XACT_ABORT ON as it does when in a try catch block:
http://connect.microsoft.com/SQLServer/feedback/details/275308/have-raiserror-work-with-xact-abort
annoying, you would expect raiserror to stop the transaction process, but it does not...unless it is in a try-catch block, i believe.
Lowell
June 23, 2010 at 5:22 pm
Thanks for the answer Lowell!
Barkingdog (from one dog to another.....)
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply