What do the different severity levels of RAISERROR mean?

My best google result was this :

  • Below 11 are warnings, not errors.
  • 11-16 available for use
  • higher than 16 - system errors
  • no difference in behavior between 11-16

But from BOL "Severity levels from 0 to 18 can be specified by any user."

In my specific stored procedure, I want the error to be returned to the .Net client application, so it looks like any severity level between 11-18 will do the trick. Does anyone have any authoritative information about what each level means and how they should be used?

+62
sql-server
Jul 14 '09 at 0:46
source share
1 answer

Database Engine Severity Levels

You should return 16. Is the default most commonly used error level:

Indicates common errors that can be corrected by the user.

Do not return 17-18, this indicates more serious errors, such as resource problems:

Indicate software errors that cannot be corrected by the user. Notify your system administrator of the problem.

Also do not return 11-15, because they have a special meaning attached to each level (14 - access to security, 15 - syntax error, 13 - deadlock, etc.).

Level 16 does not complete execution.

When you intend to log a warning, but continue to execute, use a severity level below 10.

+91
Jul 14 '09 at 0:53
source share



All Articles