Getting Started with Adobe After Effects - Part 6: Motion Blur
A collection of quick technology learning tips from what people around you learn every day

Disabling/Enabling SQL Jobs or Job schedule from remote computer

Jun 29 2011 5:34AM by Manas Ranjan Dash   

Here is the way to disbale/enable the SQL Jobs or its schedule from remote computer, The script is usning windows authentication and querying the MSDB database.

--Main Scripts
SQLCMD.EXE -S <servername> -E -dmsdb -h-1  -iQueryToRun_MSDB.sql -o output.txt

--QueryToRun_MSDB.sql (For Disabling SQL Jobs)
EXEC sp_update_job @job_name=N'S_AAAA',@enabled=0

--QueryToRun_MSDB.sql (For Enabling SQL Jobs Schedule)
EXEC sp_update_jobschedule @job_name = N'S_AAAA', @name =N'SCH_AAAA1' ,@enabled = 1


--Use @enabled  = 1 for enabling and @enabled  = 0 for disabling.

You can visit MSDN for more learning on this storeprocedure.

Read More..   [0 clicks]

Published under: General Technology Tips ·  ·  ·  · 


Manas Ranjan Dash
39 · 5% · 1482
4
 
0
Knew
 
 
0
Incorrect
 
0
Interesting
 
0
Forgotten



Submit

Your Comment


Sign Up or Login to post a comment.

"Disabling/Enabling SQL Jobs or Job schedule from remote computer" rated 5 out of 5 by 4 readers
Disabling/Enabling SQL Jobs or Job schedule from remote computer , 5.0 out of 5 based on 4 ratings
    Copyright © Rivera Informatic Private Ltd Contact us      Privacy Policy      Terms of use      Report Abuse      Advertising      [ZULU1097]