How to Check the Status of SQL Server Agent?

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.

SQL Server Agent

Windows Service
We can check it form Windows Service list.
Control Panel > Administrative Tools > Services.
Status filed determines the agent status.

Windows Service sql agent status

Configuration Manager
We can check it form the Configuration Manager.
Program Files > SQL Server > Configuration Tools > Configuration Manager.
Click SQL Server Services.

Configuration Manager, sql agent status

SQL Query
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.

Comments

  1. By Rejaul Karim

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *