您好,欢迎访问一九零五行业门户网

自动开始SQL的Agent代理

自动开始sql的agent代理 agent -- sp_sqlagent_autostart-- created by gertd@sqldev.net-- note: works on nt/win2k/winxp only, not in win9x--use mastergo if exists (select * from sysobjects where name = 'sp_sqlagent_autostart' and type = 'p') dr
自动开始sql的agent代理 agent -- sp_sqlagent_autostart-- created by gertd@sqldev.net-- note: works on nt/win2k/winxp only, not in win9x--use mastergo if exists (select * from sysobjects where name = 'sp_sqlagent_autostart' and type = 'p') drop proc dbo.sp_sqlagent_autostartgocreate proc dbo.sp_sqlagent_autostartasset nocount ondeclare @service nvarchar(128)if (charindex(n'7.00', @@version, 0) > 0)begin select @service = n'sqlserveragent'endif (charindex(n'8.00', @@version, 0) > 0)begin if (serverproperty('instancename') is null) select @service = n'sqlserveragent' else select @service = n'sqlagent$' + convert(nvarchar(128), serverproperty('instancename'))endexec master.dbo.xp_servicecontrol 'start', @servicegoexec master.dbo.sp_procoption 'sp_sqlagent_autostart', 'startup', 'true'go
其它类似信息

推荐信息