Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase ««123»»

Error Severity Expand / Collapse
Author
Message
Posted Thursday, April 16, 2009 4:31 AM


Hall of Fame

Hall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of Fame

Group: General Forum Members
Last Login: Wednesday, August 13, 2014 9:41 AM
Points: 3,241, Visits: 4,999
"0-25", Thats what I think and thats what I answered. But didn't get the score...

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

Sometimes, winning is not an issue but trying.

You can check my BLOG here

Post #698281
Posted Thursday, April 16, 2009 5:27 AM
SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: Today @ 3:02 AM
Points: 1,739, Visits: 6,353
Agreed, the answer should definitely be 0 to 25 for the reasons already given
Post #698301
Posted Thursday, April 16, 2009 5:38 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Friday, August 22, 2014 8:50 PM
Points: 6,594, Visits: 8,877
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

I have read (somewhere) that users 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.


Wayne
Microsoft Certified Master: SQL Server 2008
If you can't explain to another person how the code that you're copying from the internet works, then DON'T USE IT on a production system! After all, you will be the one supporting it!
Links: For better assistance in answering your questions, How to ask a question, Performance Problems, Common date/time routines,
CROSS-TABS and PIVOT tables Part 1 & Part 2, Using APPLY Part 1 & Part 2, Splitting Delimited Strings
Post #698310
Posted Thursday, April 16, 2009 5:58 AM
SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Monday, September 24, 2012 8:10 AM
Points: 2,042, Visits: 499
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
Post #698322
Posted Thursday, April 16, 2009 6:01 AM
SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Monday, July 21, 2014 2:56 AM
Points: 2,603, Visits: 2,061
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.


---------------------------------------------------
"Thare are only 10 types of people in the world:
Those who understand binary, and those who don't."
Post #698325
Posted Thursday, April 16, 2009 6:06 AM
SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: Friday, January 11, 2013 8:20 AM
Points: 1,608, Visits: 373
beezell (4/16/2009)
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


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!



Best regards,
Dietmar Weickert.
Post #698326
Posted Thursday, April 16, 2009 6:08 AM
SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Monday, July 21, 2014 2:56 AM
Points: 2,603, Visits: 2,061
Yes Brian(beezell), that was the reason I have opted for 0-24 correct answer.



---------------------------------------------------
"Thare are only 10 types of people in the world:
Those who understand binary, and those who don't."
Post #698330
Posted Thursday, April 16, 2009 7:19 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Friday, March 28, 2014 8:58 AM
Points: 48, Visits: 9
For SQL 2000
[/url]

For SQL 2008
[url=http://msdn.microsoft.com/en-us/library/ms164086.aspx]


They all say 0 - 25.

What am i missing??????
Post #698392
Posted Thursday, April 16, 2009 7:55 AM


SSC-Dedicated

SSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-Dedicated

Group: Administrators
Last Login: Yesterday @ 6:37 PM
Points: 33,189, Visits: 15,329
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.







Follow me on Twitter: @way0utwest

Forum Etiquette: How to post data/code on a forum to get the best help
Post #698448
Posted Thursday, April 16, 2009 8:08 AM
Hall of Fame

Hall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of Fame

Group: General Forum Members
Last Login: Yesterday @ 7:40 AM
Points: 3,998, Visits: 1,174
The only thing we're missing is getting credit for the correct answer.

And apparently we are no longer missing that!
Post #698477
« Prev Topic | Next Topic »

Add to briefcase ««123»»

Permissions Expand / Collapse