Error %d, severity %d, state %d was raised, but no message with that error number was found in sys.messages. If error is larger than 50000, make sure the user-defined message is added using sp_addmessage.

Error Message:
Msg 18054, Level 16, State 1, Line 1
Error %d, severity %d, state %d was raised, but no message with that error number was found in sys.messages. If error is larger than 50000, make sure the user-defined message is added using sp_addmessage.

Severity level:
16.

Description:
This error message appears when you try raise an error with an internal error_id, but this error_id can not be found in sys.messages.

Consequences:
The T-SQL statement can be parsed, but causes the error at runtime.

Resolution:
Error of the Severity level 11 are generated by the user and can be fixed by the SQL Server user. The statement cannot be run this way. The error_id must exist in sys.messages

Versions:
All versions of SQL Server.

Example(s):
RAISERROR (13000, 16, 1)

Remarks:
In the above example we try to raise error 13000. Because this error_id does not exist in sys.messages, the error is raised.

]]>

Leave a comment

Your email address will not be published.