• Steve Jones - SSC Editor (4/3/2012)


    Jeff Moden (4/3/2012)


    The "advantages" you have for THROW are actually disadvantages for me especially when it comes to THROW having fewer parameters. I really hope this is April Fools joke. I'm totally disgusted with what Microsoft thinks "improvements" actually are.

    And here I thought it was a better move. RAISERROR can depend on sys.messages, which creates a dependency for the database on the instance. This can easily cause issues in DR situations, or database moves. The idea of getting more contained inside databases means we need a better way. I suppose RAISERROR could have been modified to use a database table, but I'm not sure THROW is a bad move.

    It probably needs a little more work, and I'd encourage you to submit ideas to CONNECT and get people to vote for them. I think THROW will work well in the future.

    Adding THROW is a great idea. Removing RAISERROR is a horrible idea. I'm going to write an article on how to use RAISERROR the way I use it, show that it can't be done with THROW, and open a CONNECT item pointing to the article.

    From where I sit, THROW needs a hell of a lot of work to even come close to the easy functionality you can get out of RAISERROR. Does RAISERROR have some problems? You bet. And they should fix those problems instead of removing still more functionality. Considering all the things that THROW cannot do, I'm 100% sure that I'll never use it. Heh... same goes for FORMATMESSAGE. Way too much work and employs the very same technology/requirements that so many say you have to do with RAISERROR to make it useful and nothing could be further from the truth there.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)