Error Severity

  • Is there a SQL2005 system table / view that contains the severity levels and their descriptions.

    We are doing some fancy error logging, and were hoping to be able to find that in a system table instead of hardcoding it.

    Thanks,

    Jason

    The Redneck DBA

  • It's not exactly what you're looking for, but would the ERROR_SEVERITY() function work?

    Cary

  • select * from sys.messages will give you the error text as well as severity, etc.:

    message_id

    language_id

    severity

    is_event_logged

    text

    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!

  • I don't think there is a lookup table that you can query directly on SQL Server.

    the description of the levels is actually in BOL

    ms-help://MS.SQLCC.v9/MS.SQLSVR.v9.en/sqlerrm9/html/3e7f5925-6edd-42e1-bf17-f7deb03993a7.htm

    I know this is not good news but ...


    * Noel

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply