SQL Script to disable timers

SQL Script to disable timers

  
Good day,

I was just wondering, is there a way I could run a script to disable all timers from executing?

The reason I am asking is because of the following:

  • We are planning to take a full backup of our production database and restore it on our QA environment to have new and valid data, however, we have a number of timers that could cause havoc if they are run on the QA environment without being disabled beforehand.
I know we can go in to the Service Center and disable them one by one, but I would prefer to disable all and enable only the ones needed when we finish the restore of the database in QA?

Any tips would be greatly appreciated!

Thank you,

Hi Eduard,

check the "Meta_Cyclic_Job" system table. I haven't tried it myself, so I can't be sure it'll work, but maybe setting the Active atrtribute to false will do that. :)
António Chinita wrote:
Hi Eduard,

check the "Meta_Cyclic_Job" system table. I haven't tried it myself, so I can't be sure it'll work, but maybe setting the Active atrtribute to false will do that. :)
 Thanks, I'll give it a try quickly in our QA environment to see if it works.

Will let you know.
 
Hi Eduard,

i have attached the advance query through which you can set the next_run of your job to null and it will not execute in future. You can do the same by using aggregate also. Choice is yours.
Have a great day.

Thanks,
Manish Jawla