question

MSTechie-7364 avatar image
0 Votes"
MSTechie-7364 asked ErlandSommarskog commented

Event ID for SQL Server Stopped and Event ID for SQL Agent Stopped

In the Windows Event Viewer,


1)what is the Event ID for SQL Server Stopped and
2)what is the Event ID for SQL Agent Stopped

Will the EVENT-Type be Information or ERROR or Warning for SQL Server stopped.

sql-server-general
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

I can't resist to ask: why not simply test and see what you get?

1 Vote 1 ·
AmeliaGu-msft avatar image
0 Votes"
AmeliaGu-msft answered ErlandSommarskog commented

Hi MSTechie-7364,

what is the Event ID for SQL Server Stopped

When SQL Serer stopped, There will be an information type Event ID 17148 (SQL Server is terminating in response to a 'stop' request from Service Control Manager. This is an informational message only. No user action is required.) in the application log and an information type Event ID 7036 (The SQL Server (instancename) service entered the stopped state.) in the system log.

126910-image.png

126916-image.png

what is the Event ID for SQL Agent Stopped.

when SQL Server Agent stopped, there will be an information type Event ID 15457 (Configuration option 'Agent XPs' changed from 1 to 0. Run the RECONFIGURE statement to install.) and an information type Event ID 7036 (The SQL Server Agent(instancename) service entered the stopped state.) in the system log.
126963-image.png

126956-image.png

Best Regards,
Amelia


If the answer is helpful, please click "Accept Answer" and upvote it.



image.png (45.5 KiB)
image.png (49.1 KiB)
image.png (43.0 KiB)
image.png (62.4 KiB)
image.png (61.9 KiB)
· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Thank you @AmeliaGu-msft
The Event ID 17148 , is the SQL Service is manually stopped from the SCM, which is of Eventtype Information

What would be eventID when SQL Server is stopped due to some ERROR.

0 Votes 0 ·

What would be eventID when SQL Server is stopped due to some ERROR.

open Task Manager. Find the SQL Server process. Press the Delete button. Check Event Viewer. Don't do this on a server where you have databases you care for.

0 Votes 0 ·
pituach avatar image
0 Votes"
pituach answered

Good day,

(1) Open the SQL Server Configuration Manager

(2) Open event viewer -> windows log -> application -> sort the information by date

(3) Using the SQL Server Configuration Manager Stop the server

(4) Check the events which were added in the event viewer

Next do the same for the SQL Server Agent service

Note! Stopping the SQL Server will stop related services and you will probably get a few events

126879-image.png



image.png (84.8 KiB)
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.