2012年2月25日星期六

Disabling SQL jobs using command line

Hi,
Is it possble to disable a SQL using command line?
If so, pls show me how or direct me to somewhere where I can find the
information.
Thanks in advanceSimply stop the service, see the Screencast on my website for more
detailed information.
In summary you just use the NET STOP command.
HTH, Jens K. Suessmeyer.
http://www.sqlserver2005.de
--|||Sorry did not read the "job" in the subject:
UPDATE sysjobs
SET enabled = 0
WHERE jobId = 'SomeId'
HTH, Jens K. Suessmeyer.
http://www.sqlserver2005.de
--|||Check out sp_update_job.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"AppleDopod" <hk_007@.hotmail.com> wrote in message news:OgWwQxBUHHA.4832@.TK2MSFTNGP04.phx.gb
l...
> Hi,
> Is it possble to disable a SQL using command line?
> If so, pls show me how or direct me to somewhere where I can find the info
rmation.
> Thanks in advance
>|||Or
calling sp_update_job via SQLCMD or OSQL.
(No I think I am done. :-) )|||Sure. try:
exec msdb..sp_update_job @.job_name = 'yourjobname', @.enabled=0
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com|||Thanks everyboday. It worked great!!
"Paul Ibison" <Paul.Ibison@.Pygmalion.Com> wrote in message
news:OmCG5gCUHHA.4668@.TK2MSFTNGP04.phx.gbl...
> Sure. try:
> exec msdb..sp_update_job @.job_name = 'yourjobname', @.enabled=0
> Cheers,
> Paul Ibison SQL Server MVP, www.replicationanswers.com
>

没有评论:

发表评论