I am using SQL Server 2008 r2. I want to find a way to verify if SQL Server Agent is running. I am suspicious that the Agent isn't running, but I don't know how to check.
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.
To configure SQL Server AgentSelect the Start button, and then, on the Start menu, select Control Panel. In Control Panel, select System and Security, select Administrative Tools, and then select Local Security Policy.
In Management Studio, you can check if SQL Server Agent is running by looking at the SQL Server Agent node in Object Explorer. In the following screen shot, SQL Server Agent on my SQL Server 2012 instance is running (green arrow overlaid on the SQL Server Agent icon), but the agent for SQL Server 2000 is stopped (red x).
You can also check in Control Panel > Administrative Tools > Services:
Or in Program Files > Microsoft SQL Server > Configuration Tools > Configuration Manager:
Finally, you can check the state using T-SQL:
DECLARE @agent NVARCHAR(512);
SELECT @agent = COALESCE(N'SQLAgent$' + CONVERT(SYSNAME, SERVERPROPERTY('InstanceName')),
N'SQLServerAgent');
EXEC master.dbo.xp_servicecontrol 'QueryState', @agent;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With