SQL Agent显示“SQL Agent XPs已禁用”,但它们不是

时间:2015-08-06 23:09:02

标签: sql sql-server sql-server-2012 sql-agent

SQL Server 2012 SP2 CU6 v-5592

我启动SQL服务和SQL代理服务;两者都开始了。然后我登录到Windows 2012 Ent(不是R2)服务器上的SSMS,SQL Agent有红色X,并在SSMS中显示为“SQL Agent XPs Disabled”,我只需右键单击对象资源管理器中的刷新服务,一切正常

重新运行reconfigure = 1和相同的事情;说已经设置为1

两台相同的服务器;在同一天安装一个没有。

为什么这不是说Disabled?我的工作会失败吗?我怎么摆脱这个?

1 个答案:

答案 0 :(得分:-1)

执行此操作

USE MASTER DATABASE 
    declare @agent_enabled bit
    declare @show_advanced bit
    select @show_advanced = cast(value_in_use as bit)
    from sys.configurations where name = N‘show advanced options’
    select @agent_enabled = cast(value_in_use as bit)
    from sys.configurations where name = N‘Agent XPs’
    if 0 <> @agent_enabled
    begin
    if 1 <> @show_advanced
    begin
    exec sys.sp_configure @configname = N‘show advanced options’, @configvalue = 1
    reconfigure with override
    end
    exec sys.sp_configure @configname = N‘Agent XPs’, @configvalue = 0
    reconfigure with override
    if 1 <> @show_advanced
    begin
    exec sys.sp_configure @configname = N‘show advanced options’, @configvalue = 0
    reconfigure with override
    end
    end

然后转到

Start -> Control Panel -> Administrative Tools -> Services (double click)->SqlServerAgent(MSSQLSERVER)-> Start(right click)