October 3, 2014 at 3:50 pm
Goood question, thanks Steve.
I might have been better to reference BOL's Database Engine Error Severities page as well as the raiserror page, as that might also provide people to use severities in range 11 to 16 in such a way as to conform to Microsoft's recommendations for those severities.
Tom
October 3, 2014 at 10:18 pm
Steve Jones - SSC Editor (10/2/2014)
Note that THROW works well in some cases, RAISERROR in others.Learn how to use both.
It is worth noting that the THROW "message" is fixed to severity 16, doesn't support printf type functionality and is SQL Server 2012 and later.
😎
October 4, 2014 at 7:45 am
Eirikur Eiriksson (10/3/2014)
Steve Jones - SSC Editor (10/2/2014)
Note that THROW works well in some cases, RAISERROR in others.Learn how to use both.
It is worth noting that the THROW "message" is fixed to severity 16, doesn't support printf type functionality and is SQL Server 2012 and later.
😎
I guess that indicates that Microsoft had learnt from RAISERROR, and the lesson was that they shouldn't give users access to severitys 11 to 15 because they would just misuse them. They had left scope for RAISERROR to be abused, but why make the same mistake with THROW? :unsure:
Tom
October 4, 2014 at 8:49 am
TomThomson (10/4/2014)
Eirikur Eiriksson (10/3/2014)
Steve Jones - SSC Editor (10/2/2014)
Note that THROW works well in some cases, RAISERROR in others.Learn how to use both.
It is worth noting that the THROW "message" is fixed to severity 16, doesn't support printf type functionality and is SQL Server 2012 and later.
😎
I guess that indicates that Microsoft had learnt from RAISERROR, and the lesson was that they shouldn't give users access to severitys 11 to 15 because they would just misuse them. They had left scope for RAISERROR to be abused, but why make the same mistake with THROW? :unsure:
Must admit that I have always struggled with the concept of a user correctable error in this context.
😎
October 5, 2014 at 11:53 pm
Good one ...
October 9, 2014 at 3:28 am
Gr8 question, very informative, thanx.
Thanks & Best Regards,
Hany Helmy
SQL Server Database Consultant
Viewing 6 posts - 16 through 20 (of 20 total)
You must be logged in to reply to this topic. Login to reply