I have created a custom message to allow me to write to the NT event log with out being a admin. It creates the message in sysmesages and writes to the event log using raiserror but the event id, in the evetn log is 17052. And gives the the following error before it shows my message
"The description for Event ID ( 17052 ) in Source ( MSSQLSERVER ) cannot be found. The local computer may not have the necessary registry information or message DLL files to display messages from a remote computer. "
Code to add messages:
USE master
go
Exec sp_dropmessage 900001
Exec sp_dropmessage 900002
Exec sp_dropmessage 900003
EXEC sp_addmessage @msgnum = 900001,
@severity = 14,
@msgtext = 'Info Msg created on ''%s'', Msg: ''%s'' Event Id: ''%s'' Event Type: ''%s'' on ''%s'''
, @lang = 'US_English'
, @with_log = 'TRUE'
EXEC sp_addmessage @msgnum = 900002,
@severity = 15,
@msgtext = 'Warn Msg created on ''%s'', Msg: ''%s'', Event Id: ''%s'' Event Type: ''%s'' on ''%s'''
, @lang = 'US_English'
, @with_log = 'TRUE'
EXEC sp_addmessage @msgnum = 900003,
@severity = 16,
@msgtext = 'Error Msg created on ''%s'', Msg: ''%s'' Event Id: ''%s'' Event Type: ''%s'' on ''%s'''
, @lang = 'US_English'
, @with_log = 'TRUE'
Raiserror Code basic:
raiserror (900003,16,1,'adb4test','This is a test','9999','9999','10/22/05')
Why does the event log not look correct and display the error about event id 17052?
"The description for Event ID ( 17052 ) in Source ( MSSQLSERVER ) cannot be found. The local computer may not have the necessary registry information or message DLL files to display messages from a remote computer. "
Code to add messages:
USE master
go
Exec sp_dropmessage 900001
Exec sp_dropmessage 900002
Exec sp_dropmessage 900003
EXEC sp_addmessage @msgnum = 900001,
@severity = 14,
@msgtext = 'Info Msg created on ''%s'', Msg: ''%s'' Event Id: ''%s'' Event Type: ''%s'' on ''%s'''
, @lang = 'US_English'
, @with_log = 'TRUE'
EXEC sp_addmessage @msgnum = 900002,
@severity = 15,
@msgtext = 'Warn Msg created on ''%s'', Msg: ''%s'', Event Id: ''%s'' Event Type: ''%s'' on ''%s'''
, @lang = 'US_English'
, @with_log = 'TRUE'
EXEC sp_addmessage @msgnum = 900003,
@severity = 16,
@msgtext = 'Error Msg created on ''%s'', Msg: ''%s'' Event Id: ''%s'' Event Type: ''%s'' on ''%s'''
, @lang = 'US_English'
, @with_log = 'TRUE'
Raiserror Code basic:
raiserror (900003,16,1,'adb4test','This is a test','9999','9999','10/22/05')
Why does the event log not look correct and display the error about event id 17052?