|
|
|
SSCommitted
      
Group: General Forum Members
Last Login: Wednesday, April 17, 2013 3:39 AM
Points: 1,768,
Visits: 1,312
|
|
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."
|
|
|
|
|
Hall of Fame
       
Group: General Forum Members
Last Login: Thursday, March 14, 2013 4:15 AM
Points: 3,240,
Visits: 4,960
|
|
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
|
|
|
|
|
SSCommitted
      
Group: General Forum Members
Last Login: Wednesday, April 17, 2013 3:39 AM
Points: 1,768,
Visits: 1,312
|
|
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."
|
|
|
|
|
Hall of Fame
       
Group: General Forum Members
Last Login: Thursday, March 14, 2013 4:15 AM
Points: 3,240,
Visits: 4,960
|
|
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
|
|
|
|
|
SSCarpal Tunnel
       
Group: General Forum Members
Last Login: Today @ 3:22 AM
Points: 4,218,
Visits: 3,875
|
|
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
|
|
|
|
|
SSCommitted
      
Group: General Forum Members
Last Login: Friday, January 11, 2013 8:20 AM
Points: 1,608,
Visits: 373
|
|
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.
|
|
|
|
|
SSCommitted
      
Group: General Forum Members
Last Login: Today @ 12:54 AM
Points: 1,969,
Visits: 1,820
|
|
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
|
|
|
|
|
SSCrazy
      
Group: General Forum Members
Last Login: Today @ 1:06 AM
Points: 2,525,
Visits: 3,618
|
|
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
|
|
|
|
|
SSCrazy
      
Group: General Forum Members
Last Login: Today @ 1:06 AM
Points: 2,525,
Visits: 3,618
|
|
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
|
|
|
|
|
SSCarpal Tunnel
       
Group: General Forum Members
Last Login: Today @ 3:22 AM
Points: 4,218,
Visits: 3,875
|
|
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) endNo, 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
|
|
|
|