Custom error message in SQL Log Viewer with Windows NT and Application options - by GUYO

Status : 

  By Design<br /><br />
		The product team believes this item works according to its intended design.<br /><br />
		A more detailed explanation for the resolution of this particular item may have been provided in the comments section.


1
0
Sign in
to vote
ID 779001 Comments
Status Closed Workarounds
Type Bug Repros 0
Opened 2/11/2013 1:58:51 PM
Access Restriction Public

Description

Either the label or the value are wrong when the Windows Event log error messages are displayed in SQL Log Viewer.  The Level value has the label "Severity".
Sign in to post a comment.
Posted by Microsoft on 2/12/2013 at 11:45 AM
Hello Guyo,

In your repro you call RaiseError(50001,1,2). The 2nd and 3rd arguments are severity and state. The docs (http://msdn.microsoft.com/en-us/library/ms178592.aspx) state:

    When using msg_id to raise a user-defined message created using sp_addmessage, the severity specified on RAISERROR
    overrides the severity specified in sp_addmessage.

You state that the output you see in the event log is:

    Error: 50001 Severity: 1 State:2

This seems to match the documented behavior. Can you please comment further?

Thanks,
Peter Shier