Saturday, December 14, 2013

SQL Server Maintenance Plan Error - 'Agent XPs' component is turned off


I recently encountered the following error on a Windows 2012 Server running SQL Server 2012 when I attempted to open the maintenance plan.

‘Agent XPs’ component is turned off as part of the security configuration for this server. A system administrator can enable the use of ‘Agent XPs’ by using sp_configure. For more information about enabling ‘Agent XPs’, see “Surface Area Configuration” in SQL Server Books Online.

 To my knowledge the ‘Agent XPs’ components were not turned off by anyone intentionally.  The ‘Agent XPs’ option enables the SQL Server Agent extended stored procedures on a SQL Server Instance.  When not enabled the SQL Server Agent is not available in the SQL Server Management Studio Object Explorer.  When you use SQL Server Management Studio to start the SQL Server Agent service these extended stored procedures are enabled automatically.

 The error was resolved by performing the following.

(1)    Ran the following from SSMS in the SQL Query Window when connected to the master database.

sp_configure 'show advanced options', 1;
GO

RECONFIGURE;
GO

sp_configure 'Agent XPs', 1;
GO

RECONFIGURE;
GO

Output in the Messages Window

Configuration option ‘show advanced options’ changed from 0 to 1.  Run the RECONFIGURE statement to install.
Configuration option ‘Agent XPs’ changed from 0 to 1.  Run the RECONFIGURE statement to install.

(2)    At this point I noticed my SQL Server Agent was down (I saw this in the SSMS Object Explorer ).  I double checked my SQL Server Agent Error Logs and discovered the agent had been down for three days.  I also validated that my backups had not run for that same period which made sense as the agent was down.  I started the agent via selecting it, right mouse click, start.

 

 

 
Upon further investigation I believe I have discovered the issue that caused this error.  Three days ago the Windows
SA changed the service account for the SQL Server, SQL Server (MSSQLSERVER) and the agent, SQL Server Agent
(MSSQLSERVER).  After he changed them he did restart the service, but never went back and validated the jobs,
maintenance plans, etc.  The database service and agent appeared to restart successfully as no errors were thrown to
him, but for some reason changing the service account caused issues for the agent and it did not start.

No comments:

Post a Comment