Wednesday, September 26, 2007

Agent XPs Disabled

Restarting SQL Server sometimes causes Agent XP disabled, so if you try to start then SQL Server Agent it will start and then immediately stop, but it will show you Agent XPs Disabled in brackets with Agent name, to confirm you can also run the following query,

Select Name, Value from sys.Configurations Where name in ('Agent XPs','Show Advanced Options')

If it is showing Agent XPs Value Zero then Use the following code to change it,

exec sys.sp_configure @configname = N'show advanced options', @configvalue = 1
reconfigure with override
exec sys.sp_configure @configname = N'Agent XPs', @configvalue = 1
reconfigure with override
exec sys.sp_configure @configname = N'show advanced options', @configvalue = 0
reconfigure with override

After running the above line, just sit with patience or have a cup of coffee meanwhile because it will automatically starts Agent but will take 10 to 15 minutes.

No comments: