How to create maintenance plan in SQL Server?

nectar picture nectar · Jul 6, 2010 · Viewed 16.6k times · Source

When I'm trying to create a new maintenance plan in SQL Server, it is showing this error:

TITLE: Microsoft SQL Server Management Studio
------------------------------

'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. (ObjectExplorer)  

Answer

Martin Smith picture Martin Smith · Jul 6, 2010

You need to enable the SQL Server Agent extended stored procedures first by running the following.

sp_configure 'show advanced options', 1;
GO
RECONFIGURE;
GO
sp_configure 'Agent XPs', 1;
GO
RECONFIGURE
GO