Severity Levels

The severity level provides an indication of the type of problem SQL Server has encountered.

Severity levels 0 and 10 are informational messages and indicate problems caused by mistakes in the information you have entered. Both severity level 0 and 10 messages are sent as severity 0 (for backward compatibility).

Severity levels 11 through 16 are generated by the user, and these errors can be corrected by the user.

Severity levels 17 and higher indicate software or hardware errors. When a level 17, 18, or 19 error occurs, you can continue the work you're doing, although you might not be able to execute a particular statement.

Severity levels 20 and higher indicate system problems. These are fatal errors, which means that the process (the program code that accomplishes the task specified in your statement) is no longer running. The process freezes before it stops, recording information about what occurred. The process then terminates. The client connection to SQL Server closes, and, depending on the problem, the client might not be able to reconnect. Some problems with a severity level of 19 or higher affect only one user and one process. Others affect all the processes in the database. These problems don't necessarily damage a database or its objects, but they can. Still other problems are caused by hardware malfunctions.

Users should inform the system administrator (SA) whenever problems that generate errors with severity levels 17 and higher occur. The SA must resolve these errors and track their frequency. The SA should monitor all problems that generate severity levels 18 through 24 and print the error log, which contains information to help backtrack from the error.

If the problem affects an entire database, you can use the DBCC (database consistency checker) statement to determine the extent of the damage. DBCC might identify some objects that must be removed, and if the damage is extensive, the database might have to be reloaded. For more information about DBCC and about loading a database, see Chapter 12, "Backing Up and Restoring," and the Microsoft SQL Server Transact-SQL Reference.

The following sections briefly describe each severity level. For specific instructions for correcting errors, see Chapters 21 through 25.