执行这个
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)