XACT_ABORT and RAISERROR relationship

  • 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.

  • 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


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • 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