﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>SQLServerCentral / Article Discussions / Article Discussions by Author / Discuss content posted by free mascot  / Error Severity / Latest Posts</title><generator>InstantForum.NET v2.9.0</generator><description>SQLServerCentral</description><link>http://www.sqlservercentral.com/Forums/</link><webMaster>notifications@sqlservercentral.com</webMaster><lastBuildDate>Sat, 25 May 2013 09:55:35 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: Error Severity</title><link>http://www.sqlservercentral.com/Forums/Topic698149-1461-1.aspx</link><description>I find the question and the answer explanation hilarious.  Question writing is not as easy it is would seem. :-)</description><pubDate>Thu, 16 Apr 2009 21:19:00 GMT</pubDate><dc:creator>DPhillips-731960</dc:creator></item><item><title>RE: Error Severity</title><link>http://www.sqlservercentral.com/Forums/Topic698149-1461-1.aspx</link><description>[quote][b]free_mascot (4/16/2009)[/b][hr]Hello,My intention to post this question was to makes things clear.I do agree 0-25 is correct Answer.At the time of posting question I have executed select * from sysmessages where severity = 25 in sql server 2000 and sql server 2008 (sys.messages) and found that there are 3 entry in sql server 2000 and no entry in 2008. Hence opted for 0-24.Also ambiguity in BOL make me confused.I thank you all of you for clarifying the same. Appology for not scoring a point for correct answer. :pinch:[/quote]Well sorry, but you are confusing the hell out of me. Look at your answer below:[quote][b]Correct answer:  0 to 25  [/b][/quote]here you said that the corret answer was 0 to 25 but yet....[quote]Explanation:  Answer is very simple and state forward; [b]the correct answer is 0 to 24[/b]. 0-10 return informational messages, 11-15 return user-correctable errors, 17-19 are not user-correctable and should be reported to the sysadmin. 20-25 are fatal errors.  [/quote]here you said the correct answer was 0 to 24. I did the following query:[code]select distinct severity from sys.messages order by severity desc[/code] and found that there were severities 0 to 24 yet I did not get my point and got the message that my answer was wrong.Not much worried about the point but think that people should before the post questions make sure of their facts.</description><pubDate>Thu, 16 Apr 2009 11:29:24 GMT</pubDate><dc:creator>Manie Verster</dc:creator></item><item><title>RE: Error Severity</title><link>http://www.sqlservercentral.com/Forums/Topic698149-1461-1.aspx</link><description>You should have credit now. Let me know if that's not the case.</description><pubDate>Thu, 16 Apr 2009 10:13:12 GMT</pubDate><dc:creator>Steve Jones - SSC Editor</dc:creator></item><item><title>RE: Error Severity</title><link>http://www.sqlservercentral.com/Forums/Topic698149-1461-1.aspx</link><description>The only thing we're missing is getting credit for the correct answer. :crazy:And apparently we are no longer missing that!:-P</description><pubDate>Thu, 16 Apr 2009 08:08:54 GMT</pubDate><dc:creator>David Harder</dc:creator></item><item><title>RE: Error Severity</title><link>http://www.sqlservercentral.com/Forums/Topic698149-1461-1.aspx</link><description>The correct answer should be 0-25. BOL is slightly ambiguous as nothing is listed for 25. I have notified them of that.Points are awarded back and the answer changed.</description><pubDate>Thu, 16 Apr 2009 07:55:56 GMT</pubDate><dc:creator>Steve Jones - SSC Editor</dc:creator></item><item><title>RE: Error Severity</title><link>http://www.sqlservercentral.com/Forums/Topic698149-1461-1.aspx</link><description>For SQL 2000[url=http://msdn.microsoft.com/en-us/library/aa937483(SQL.80).aspx][/url]For SQL 2008[url=http://msdn.microsoft.com/en-us/library/ms164086.aspx][/url] They all say 0 - 25.What am i missing??????</description><pubDate>Thu, 16 Apr 2009 07:19:38 GMT</pubDate><dc:creator>robert.kosik</dc:creator></item><item><title>RE: Error Severity</title><link>http://www.sqlservercentral.com/Forums/Topic698149-1461-1.aspx</link><description>Yes Brian(beezell), that was the reason I have opted for 0-24 correct answer. :-D</description><pubDate>Thu, 16 Apr 2009 06:08:53 GMT</pubDate><dc:creator>free_mascot</dc:creator></item><item><title>RE: Error Severity</title><link>http://www.sqlservercentral.com/Forums/Topic698149-1461-1.aspx</link><description>[quote][b]beezell (4/16/2009)[/b][hr]Run this query on 2008 and tell me what you get back:SELECT MIN(severity),MAX(severity) FROM sys.sysmessages;That will give you your answer.  Hint: 0 and 24.  It's the same for RTM or SP1.Cheers,Brian[/quote]The fact that there are no predefined messages with severity level 25 does not mean the defined range cannot include level 25 as well - and, as a matter of fact, it does!</description><pubDate>Thu, 16 Apr 2009 06:06:03 GMT</pubDate><dc:creator>Dietmar Weickert</dc:creator></item><item><title>RE: Error Severity</title><link>http://www.sqlservercentral.com/Forums/Topic698149-1461-1.aspx</link><description>Hello,My intention to post this question was to makes things clear.I do agree 0-25 is correct Answer.At the time of posting question I have executed select * from sysmessages where severity = 25 in sql server 2000 and sql server 2008 (sys.messages) and found that there are 3 entry in sql server 2000 and no entry in 2008. Hence opted for 0-24.Also ambiguity in BOL make me confused.I thank you all of you for clarifying the same. Appology for not scoring a point for correct answer. :pinch:</description><pubDate>Thu, 16 Apr 2009 06:01:46 GMT</pubDate><dc:creator>free_mascot</dc:creator></item><item><title>RE: Error Severity</title><link>http://www.sqlservercentral.com/Forums/Topic698149-1461-1.aspx</link><description>Run this query on 2008 and tell me what you get back:SELECT MIN(severity),MAX(severity) FROM sys.sysmessages;That will give you your answer.  Hint: 0 and 24.  It's the same for RTM or SP1.Cheers,Brian</description><pubDate>Thu, 16 Apr 2009 05:58:17 GMT</pubDate><dc:creator>beezell</dc:creator></item><item><title>RE: Error Severity</title><link>http://www.sqlservercentral.com/Forums/Topic698149-1461-1.aspx</link><description>[quote][b]Carlo Romagnano (4/16/2009)[/b][hr]Correct answer is 1-25:exec sp_helptext sp_addmessagein 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[/quote]I have read (somewhere) that [u]users[/u] can create messages with error severity from 1-25. However, the database engine itself can send a severity of 0. Therefore, the correct answer is 0-25.</description><pubDate>Thu, 16 Apr 2009 05:38:09 GMT</pubDate><dc:creator>WayneS</dc:creator></item><item><title>RE: Error Severity</title><link>http://www.sqlservercentral.com/Forums/Topic698149-1461-1.aspx</link><description>Agreed, the answer should definitely be 0 to 25 for the reasons already given</description><pubDate>Thu, 16 Apr 2009 05:27:33 GMT</pubDate><dc:creator>Toreador</dc:creator></item><item><title>RE: Error Severity</title><link>http://www.sqlservercentral.com/Forums/Topic698149-1461-1.aspx</link><description>"0-25",  Thats what I think and thats what I answered. But didn't get the score...:-D</description><pubDate>Thu, 16 Apr 2009 04:31:09 GMT</pubDate><dc:creator>Atif-ullah Sheikh</dc:creator></item><item><title>RE: Error Severity</title><link>http://www.sqlservercentral.com/Forums/Topic698149-1461-1.aspx</link><description>[quote][b]Christian Buettner (4/16/2009)[/b][hr][quote][b]Carlo Romagnano (4/16/2009)[/b][hr]Correct answer is 1-25:exec sp_helptext sp_addmessagein 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[/quote]No, 0-25 is correct. The fact that you cannot use 0 for sysmessages does not mean the severity level does not exist.[/quote]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)"</description><pubDate>Thu, 16 Apr 2009 03:30:53 GMT</pubDate><dc:creator>MarkusB</dc:creator></item><item><title>RE: Error Severity</title><link>http://www.sqlservercentral.com/Forums/Topic698149-1461-1.aspx</link><description>[quote][b]Carlo Romagnano (4/16/2009)[/b][hr]Correct answer is 1-25:exec sp_helptext sp_addmessagein 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[/quote]No, 0-25 is correct. The fact that you cannot use 0 for sysmessages does not mean the severity level does not exist.</description><pubDate>Thu, 16 Apr 2009 03:18:26 GMT</pubDate><dc:creator>Christian Buettner-167247</dc:creator></item><item><title>RE: Error Severity</title><link>http://www.sqlservercentral.com/Forums/Topic698149-1461-1.aspx</link><description>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 25And 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 [code]RAISERROR('Test', 25,0) WITH LOG[/code]</description><pubDate>Thu, 16 Apr 2009 03:16:41 GMT</pubDate><dc:creator>Christian Buettner-167247</dc:creator></item><item><title>RE: Error Severity</title><link>http://www.sqlservercentral.com/Forums/Topic698149-1461-1.aspx</link><description>Correct answer is 1-25:exec sp_helptext sp_addmessagein 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</description><pubDate>Thu, 16 Apr 2009 03:13:58 GMT</pubDate><dc:creator>Carlo Romagnano</dc:creator></item><item><title>RE: Error Severity</title><link>http://www.sqlservercentral.com/Forums/Topic698149-1461-1.aspx</link><description>0 to 24 is definitely WRONG!Just try the following statement:[code]RAISERROR ('Test Message', 25, 1) WITH LOG[/code]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.)</description><pubDate>Thu, 16 Apr 2009 02:45:54 GMT</pubDate><dc:creator>Dietmar Weickert</dc:creator></item><item><title>RE: Error Severity</title><link>http://www.sqlservercentral.com/Forums/Topic698149-1461-1.aspx</link><description>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.</description><pubDate>Thu, 16 Apr 2009 01:53:37 GMT</pubDate><dc:creator>MarkusB</dc:creator></item><item><title>RE: Error Severity</title><link>http://www.sqlservercentral.com/Forums/Topic698149-1461-1.aspx</link><description>[quote]Here you can find another controversial link which says that severity level of messages between 1 and 25.[/quote]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...</description><pubDate>Thu, 16 Apr 2009 01:31:38 GMT</pubDate><dc:creator>Atif-ullah Sheikh</dc:creator></item><item><title>RE: Error Severity</title><link>http://www.sqlservercentral.com/Forums/Topic698149-1461-1.aspx</link><description>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.aspxYes it's confusing. :-(</description><pubDate>Thu, 16 Apr 2009 01:04:14 GMT</pubDate><dc:creator>free_mascot</dc:creator></item><item><title>RE: Error Severity</title><link>http://www.sqlservercentral.com/Forums/Topic698149-1461-1.aspx</link><description>[quote]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.[/quote][url]http://msdn.microsoft.com/en-us/library/ms164086.aspx[/url]Am I confused or What...?</description><pubDate>Thu, 16 Apr 2009 00:55:12 GMT</pubDate><dc:creator>Atif-ullah Sheikh</dc:creator></item><item><title>Error Severity</title><link>http://www.sqlservercentral.com/Forums/Topic698149-1461-1.aspx</link><description>Comments posted to this topic are about the item [B]&lt;A HREF="/questions/ERRORS/66112/"&gt;Error Severity&lt;/A&gt;[/B]</description><pubDate>Wed, 15 Apr 2009 23:20:22 GMT</pubDate><dc:creator>free_mascot</dc:creator></item></channel></rss>