disabled schedules - but jobs still run?


i have sql called creates half dozen jobs. these jobs have external dependencies means not want them run designated schedules until dependencies fulfilled - hence include following line @ hthe end of sql creates jobs :- update sysschedules set enabled=0 [name] '%rrd%' (all jobs prefixed rrd). if view jobs in management studio can see schedules indeed not enabled - still run , of course fail. or invoking these jobs @ scheduled time if schedule disabled. neeed disable jobs schedules seems overkill. (i because used leave schedules enabled diable jobs did not work either jobs still ran!)

when disable job through management studio (right click disable), not disable job , disable schedule job.

if update table (sysjobs) directory, miss update sysschedules tables start the job per schedule. right way disable job through t-sql use sp_update_job procedure exists under msdb database.

eg
exec msdb.dbo.sp_update_job @job_name = 'test',@enabled = 0

vidhya sagar. mark answer if helps!


SQL Server  >  Getting started with SQL Server



Comments

Popular posts from this blog

Conditional formatting a graph vertical axis in SSRS 2012 charts

Register with Power BI failed

SQL server replication error Cannot find the dbo or user defined function........