显示标签为“jobs”的博文。显示所有博文
显示标签为“jobs”的博文。显示所有博文

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 advance
Simply 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
|||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
>

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
--|||Or
calling sp_update_job via SQLCMD or OSQL.
(No I think I am done. :-) )|||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.gbl...
> 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 advance
>|||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
>

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
>

2012年2月24日星期五

disable/enable all SQL Agent jobs in a non cursor approach

Is there a way to disable/enable all SQL Agent jobs using a set based
operation as opposed to a cursory approach that i can think of right now
If so, can one provide the SQL for itI don't think so, because you should be calling a stored procedure for each
job. (As opposed to updating a table somewhere in MSDB, which you shouldn't
do without fully understanding what else the procedure does.)
What is wrong with a cursor approach for this type of one-off, admin task?
On 2/28/05 2:53 PM, in article eGUAu8cHFHA.904@.tk2msftngp13.phx.gbl,
"Hassan" <fatima_ja@.hotmail.com> wrote:

> Is there a way to disable/enable all SQL Agent jobs using a set based
> operation as opposed to a cursory approach that i can think of right now
> If so, can one provide the SQL for it
>|||Nothing wrong, always heard dreaded things about cursors and was just trying
to see if one could do so in a set based approach ?
"Aaron [SQL Server MVP]" <ten.xoc@.dnartreb.noraa> wrote in message
news:BE4926C4.181D%ten.xoc@.dnartreb.noraa...
> I don't think so, because you should be calling a stored procedure for
each
> job. (As opposed to updating a table somewhere in MSDB, which you
shouldn't
> do without fully understanding what else the procedure does.)
> What is wrong with a cursor approach for this type of one-off, admin task?
>
>
> On 2/28/05 2:53 PM, in article eGUAu8cHFHA.904@.tk2msftngp13.phx.gbl,
> "Hassan" <fatima_ja@.hotmail.com> wrote:
>
>|||NO! Not when you have to call a stored procedure for each item in the set.
And like I said, for one-off admin tasks that you're not performing
regularly, I wouldn't spend too much time worrying about the performance of
your chosen approach. Just get the task done, and then work on doing
whatever you need to do to not require that task to be necessary in the
future.
On 2/28/05 11:43 PM, in article uDpX3khHFHA.2276@.TK2MSFTNGP15.phx.gbl,
"Hassan" <fatima_ja@.hotmail.com> wrote:

> Nothing wrong, always heard dreaded things about cursors and was just tryi
ng
> to see if one could do so in a set based approach ?

2012年2月17日星期五

Disable MSX Functionality

How do you stop an MSX server being an MSX server?
In other words, how do I get Enterprise Manager back to the state where
under SQL Server Agent\Jobs I don't get sub-folders of Local and
Remote, and I'm not allowed to target jobs at other servers?
Thanks.
DaveHi,
just force defection of all your target Servers. When the last target
server
is defected then your MSX functionality should stop automatically.
Regards
Bobby Henningsen
"Dave" <david.randall@.tradeweb.com> wrote in message
news:1132328870.648249.134860@.g49g2000cwa.googlegroups.com...
> How do you stop an MSX server being an MSX server?
> In other words, how do I get Enterprise Manager back to the state where
> under SQL Server Agent\Jobs I don't get sub-folders of Local and
> Remote, and I'm not allowed to target jobs at other servers?
> Thanks.
> Dave
>
---
Jeg beskyttes af den gratis SPAMfighter til privatbrugere.
Den har indtil videre sparet mig for at f? 712 spam-mails.
Betalende brugere f?r ikke denne besked i deres e-mails.
Hent gratis SPAMfighter her: www.spamfighter.dk|||Nice one, thanks!
Dave

Disable MSX Functionality

How do you stop an MSX server being an MSX server?
In other words, how do I get Enterprise Manager back to the state where
under SQL Server Agent\Jobs I don't get sub-folders of Local and
Remote, and I'm not allowed to target jobs at other servers?
Thanks.
Dave
Hi,
just force defection of all your target Servers. When the last target
server
is defected then your MSX functionality should stop automatically.
Regards
Bobby Henningsen
"Dave" <david.randall@.tradeweb.com> wrote in message
news:1132328870.648249.134860@.g49g2000cwa.googlegr oups.com...
> How do you stop an MSX server being an MSX server?
> In other words, how do I get Enterprise Manager back to the state where
> under SQL Server Agent\Jobs I don't get sub-folders of Local and
> Remote, and I'm not allowed to target jobs at other servers?
> Thanks.
> Dave
>
Jeg beskyttes af den gratis SPAMfighter til privatbrugere.
Den har indtil videre sparet mig for at f? 712 spam-mails.
Betalende brugere f?r ikke denne besked i deres e-mails.
Hent gratis SPAMfighter her: www.spamfighter.dk
|||Nice one, thanks!
Dave

Disable Jobs With TSQL

Does anyone know how to disable and re-enable jobs using tsql?Found it, sp_update_job