How to start SQL Server Agent when Agent XPs show disabled
Problem
The other day we found that SQL Server Agent was stopped with the following message in SSMS "SQL Server Agent (Agent XPs disabled)" for one of our SQL Server instances, but the service was running according to the services console. I tried to start the service from SQL Server Management Studio, but this did not work. What is the issue and how do I fix this?Solution
The other day I changed an implementation on one of our SQL Server instances. After the change, I started all of the SQL Server services from the services.msc console and everything started successfully. But when I launched SQL Server Management Studio, SQL Server Agent showed that is was not running with 'Agent XPs disabled' message as shown below. I tried to restart the service from SSMS, but it did not work. The interesting thing was that the service showed as 'started' when I was looking at it in the services.msc console.It appears, that this issue appears when 'Agent XPs' advance configuration option is disabled and set to 0 for the SQL Server configuration..
Agent XPs is an advanced configuration option which enables the SQL Server Agent extended stored procedures on the server. When this is not enable SQL Server Agent will not be active in SSMS. Most of the time when you start the SQL Server services it automatically enables 'Agent XPs', but sometime it fails to enable or sets the value to 0 and then this issue will appear.
To fix this issue we should first set the 'Agent XPs' to 1 and then run RECONFIGURE to bring it into effect.
Step 1.
Run sp_configure to check 'Agent XPs' value.
EXEC SP_CONFIGURE 'Agent XPs'
EXEC SP_CONFIGURE 'show advanced options',1 GO RECONFIGURE GO EXEC SP_CONFIGURE 'show advanced options'
Step 3Run sp_configure again to check the value for Agent XPs. Here we can see the run value is set to 0.
EXEC SP_CONFIGURE 'Agent XPs',1 GO RECONFIGURE
No comments:
Post a Comment