SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Error Severity


Error Severity

Author
Message
free_mascot
free_mascot
SSCertifiable
SSCertifiable (7.7K reputation)SSCertifiable (7.7K reputation)SSCertifiable (7.7K reputation)SSCertifiable (7.7K reputation)SSCertifiable (7.7K reputation)SSCertifiable (7.7K reputation)SSCertifiable (7.7K reputation)SSCertifiable (7.7K reputation)

Group: General Forum Members
Points: 7715 Visits: 2250
Comments posted to this topic are about the item Error Severity

---------------------------------------------------
"Thare are only 10 types of people in the world:
Those who understand binary, and those who don't."
Atif-ullah Sheikh
Atif-ullah Sheikh
SSCertifiable
SSCertifiable (5.2K reputation)SSCertifiable (5.2K reputation)SSCertifiable (5.2K reputation)SSCertifiable (5.2K reputation)SSCertifiable (5.2K reputation)SSCertifiable (5.2K reputation)SSCertifiable (5.2K reputation)SSCertifiable (5.2K reputation)

Group: General Forum Members
Points: 5182 Visits: 5204

20-25
Indicate system problems and are fatal errors, which means that the Database Engine task that is executing a statement or batch is no longer running. The task records information about what occurred and then terminates. In most cases, the application connection to the instance of the Database Engine may also terminate. If this happens, depending on the problem, the application might not be able to reconnect.

Error messages in this range can affect all of the processes accessing data in the same database and may indicate that a database or object is damaged. Error messages with a severity level from 19 through 25 are written to the error log.




http://msdn.microsoft.com/en-us/library/ms164086.aspx



Am I confused or What...?

----------------------------------------------------------------------------------------------------------------------------------------------------------------------

Sometimes, winning is not an issue but trying.

You can check my BLOG here


free_mascot
free_mascot
SSCertifiable
SSCertifiable (7.7K reputation)SSCertifiable (7.7K reputation)SSCertifiable (7.7K reputation)SSCertifiable (7.7K reputation)SSCertifiable (7.7K reputation)SSCertifiable (7.7K reputation)SSCertifiable (7.7K reputation)SSCertifiable (7.7K reputation)

Group: General Forum Members
Points: 7715 Visits: 2250
Hello Atif,

Here you can find another controversial link which says that severity level of messages between 1 and 25.

http://msdn.microsoft.com/en-us/library/ms187382.aspx

Yes it's confusing. :-(

---------------------------------------------------
"Thare are only 10 types of people in the world:
Those who understand binary, and those who don't."
Atif-ullah Sheikh
Atif-ullah Sheikh
SSCertifiable
SSCertifiable (5.2K reputation)SSCertifiable (5.2K reputation)SSCertifiable (5.2K reputation)SSCertifiable (5.2K reputation)SSCertifiable (5.2K reputation)SSCertifiable (5.2K reputation)SSCertifiable (5.2K reputation)SSCertifiable (5.2K reputation)

Group: General Forum Members
Points: 5182 Visits: 5204

Here you can find another controversial link which says that severity level of messages between 1 and 25.


Thats true, but what I pasted in my last post is from the same link provided in the Referance of the Naswer of the Question.

I think I am missing something...

----------------------------------------------------------------------------------------------------------------------------------------------------------------------

Sometimes, winning is not an issue but trying.

You can check my BLOG here


MarkusB
MarkusB
SSChampion
SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)

Group: General Forum Members
Points: 10851 Visits: 4208
Ok, I had it wrong.
No big deal but of course I investigated this issue a little more. I'm using SQL 2008 Build 1600, so no SP1.
Obviously what's in BOL is not always correct so I didn't even bother to check.
First I had a look at the options when creating an alert. There you can create alerts for severities 1 to 25. Hmmm???
The I did a query on sys.messages and yes, sys.messages only contains messages with severity 0 and 10 - 24.
So the answer given seems to be correct.

But then I created a new message
EXEC sp_addmessage 50001,25,N'Test Message'

And yes it worked.
So I would say the correct answer is 0 - 25, unless this has been changed in SP1.
Which btw still means my answer was wrong.

Markus Bohse
Dietmar Weickert
Dietmar Weickert
SSCommitted
SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)

Group: General Forum Members
Points: 1674 Visits: 374
0 to 24 is definitely WRONG!

Just try the following statement:
RAISERROR ('Test Message', 25, 1) WITH LOG


and the result will be an error with severity level 25. (You may even use any level higher than 25 and get the same result.)

Best regards,
Dietmar Weickert.
Carlo Romagnano
Carlo Romagnano
SSCertifiable
SSCertifiable (7.6K reputation)SSCertifiable (7.6K reputation)SSCertifiable (7.6K reputation)SSCertifiable (7.6K reputation)SSCertifiable (7.6K reputation)SSCertifiable (7.6K reputation)SSCertifiable (7.6K reputation)SSCertifiable (7.6K reputation)

Group: General Forum Members
Points: 7642 Visits: 3401
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

I run on tuttopodismo
Christian Buettner-167247
Christian Buettner-167247
SSCertifiable
SSCertifiable (5.4K reputation)SSCertifiable (5.4K reputation)SSCertifiable (5.4K reputation)SSCertifiable (5.4K reputation)SSCertifiable (5.4K reputation)SSCertifiable (5.4K reputation)SSCertifiable (5.4K reputation)SSCertifiable (5.4K reputation)

Group: General Forum Members
Points: 5371 Visits: 3889
I think the confusion is related to the fact that you cannot use severity level 0 for use in sysmessages.
- Severity Levels that can be specified with RAISERROR range from 0 to 25
- Severity Levels for user defined messages to be added to sysmessages range from 1 to 25

And although severity level 25 is not explained like the others (as to what type of error this covers), it does exist and can be tested with
RAISERROR('Test', 25,0) WITH LOG



Best Regards,

Chris Büttner
Christian Buettner-167247
Christian Buettner-167247
SSCertifiable
SSCertifiable (5.4K reputation)SSCertifiable (5.4K reputation)SSCertifiable (5.4K reputation)SSCertifiable (5.4K reputation)SSCertifiable (5.4K reputation)SSCertifiable (5.4K reputation)SSCertifiable (5.4K reputation)SSCertifiable (5.4K reputation)

Group: General Forum Members
Points: 5371 Visits: 3889
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
MarkusB
MarkusB
SSChampion
SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)

Group: General Forum Members
Points: 10851 Visits: 4208
Christian Buettner (4/16/2009)
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.

I agree with Christoph,
0 to 25 should be the corrct number. Even though you cannot create a custom message with severity level 0, the fact that sys.messages contain more than a hundred message_id's with severity 0 prives enough I think.

Anyway now this discussion has been started I had another good look at the question.
"In SQL Server 2008 what is the range of severity levels?"
Maybe the question should be "What is the range of severity levels for system messages ? (0-24)"

Markus Bohse
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search