SQL Server Agent is very important to perform automated tasks. If the agent goes stop, no automated task will be executed. This article explains how to check SQL Server Agent is running or not.
We can check the agent status in different ways. Some of them are given bellow:
SQL Server Management Studio
We can check it form MS SQL Server Management Studio. At first we need to logon to the server by using SQL Server Management Studio. Check Agent node. If it is green arrow then it is running. If it is red arrow then it is stooped.
We can check it form Windows Service list.
Control Panel > Administrative Tools > Services.
Status filed determines the agent status.
We can check it form the Configuration Manager.
Program Files > SQL Server > Configuration Tools > Configuration Manager.
Click SQL Server Services.
We can check it by executing SQL query. The simple SQL query that check agent status:
IF EXISTS (SELECT 1 FROM master.sys.sysprocesses WHERE LEFT(program_name, 8) = 'SQLAgent') PRINT 'Agent is Running!' ELSE PRINT 'Agent is Stop'
If we run the above query, it will return the agent status.
We can choose any one of the above procedures to check the server agent.
2 thoughts on “How to Check the Status of SQL Server Agent?”
This article is so informative. I agree with much of your views here. Your material has ignited my brain into thinking harder. Thank you so much.