narayanamoorthy.a
Ten Centuries
Points: 1256
More actions
June 10, 2014 at 9:38 pm
#292332
Hi,
I have a job named as Check Alert on all 200 servers including QA. I wanted to disable it in a single go rather than logging to each n every SQL Instance. What is the query to disable it from SQLCMD as I dont have much exposure to scripts.
Eirikur Eiriksson
SSC Guru
Points: 182918
June 10, 2014 at 10:15 pm
#1720617
From the top of my head, it would be
😎
EXEC dbo.sp_update_job @job_name = N'Job_Name',@enabled = 0
GO
From the command line
sqlcmd -S server -d database -Q "EXEC dbo.sp_update_job @job_name = N'Job_Name',@enabled = 0"
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply