• Carlo Romagnano (4/16/2009)


    Correct answer is 1-25:

    exec sp_helptext sp_addmessage

    in the output search for @severity and you'll find this piece of code that is the law.

    -- Valid severity range for user defined messges is 1 to 25.

    if @severity not between 1 and 25

    begin

    raiserror(15041,-1,-1)

    return (1)

    end

    No, 0-25 is correct. The fact that you cannot use 0 for sysmessages does not mean the severity level does not exist.

    Best Regards,

    Chris Büttner