S
sk.rasheedfarhan
Hi all,
According to my project requirement I have to write the NT Event
information of SQL Server into EventLog viewer.
For more clear I want to write the following information into
Application log file:
------------------------------------------------------------------------------------------------------
Event ID :17055
Source :MSSQLServer
Date : xx-xx-xx
Time :xx-xx-xx
User :xxxxxx
Category :xxx
Computer :xxxx
Type :Information
Description:
17148 :
SQL Server is terminating due to 'stop' request from Service Control
Manager.
------------------------------------------------------------------------------------------------------
Through code I have to enter the above information into Application
Event Log. So I am able to write any event from "EventLog class"
through C#. But the event generated is not having the proper
description. It is having the following description:
[General one not specific to any eventid and source]
Source : Application
EventID : 0
Description :
The description for Event ID ( 0 ) in Source ( Application ) cannot be
found. The local computer may not have the necessary registry
information or message DLL files to display messages from a remote
computer. The following information is part of the event: Writing to
event log.
My Major Problem:
If I given EventID = 17055 and Source = MSSQLSERVER so how can I write
the above log information in the Event Log.And also, is it possible to
retrieve the description of the NT event from the EventMessageDLL?
Let me know ASAP.
Hope someone can help.
Sincerely
Rasheed.
According to my project requirement I have to write the NT Event
information of SQL Server into EventLog viewer.
For more clear I want to write the following information into
Application log file:
------------------------------------------------------------------------------------------------------
Event ID :17055
Source :MSSQLServer
Date : xx-xx-xx
Time :xx-xx-xx
User :xxxxxx
Category :xxx
Computer :xxxx
Type :Information
Description:
17148 :
SQL Server is terminating due to 'stop' request from Service Control
Manager.
------------------------------------------------------------------------------------------------------
Through code I have to enter the above information into Application
Event Log. So I am able to write any event from "EventLog class"
through C#. But the event generated is not having the proper
description. It is having the following description:
[General one not specific to any eventid and source]
Source : Application
EventID : 0
Description :
The description for Event ID ( 0 ) in Source ( Application ) cannot be
found. The local computer may not have the necessary registry
information or message DLL files to display messages from a remote
computer. The following information is part of the event: Writing to
event log.
My Major Problem:
If I given EventID = 17055 and Source = MSSQLSERVER so how can I write
the above log information in the Event Log.And also, is it possible to
retrieve the description of the NT event from the EventMessageDLL?
Let me know ASAP.
Hope someone can help.
Sincerely
Rasheed.