SQL to disable jobs when connecting to old DB

SQL to disable jobs when connecting to old DB

Comments

  • Hi

    We sometimes deploy our production Decisions DB to a test environment. When we do this and then start Decision with a Dev license key, we have some jobs that run and have caused some production issues (they start immediately when Decisions starts before we are able to reconfigure or disable them through the portal )

    Can you provide the SQL for us to disable these jobs before we startup Decisions for the first time ?

    Thanks

  • Hello,
    the following queries will perform the action you are looking for, we use them whenever we restore against a DB backup. The queries are in italics and their function is in bold, you will just run the italic SQL commands

    [b]Disable job_schedule[/b]
    [i]Update job_schedule [/i]
    [i]Set active =0[/i]

    [b]Disable interval_schedule_job[/b]
    [i]Update interval_schedule_job [/i]
    [i]Set disabled =1[/i]

    [b]Delete all from job_pending[/b]
    [i]Delete from job_pending[/i]

Sign In or Register to comment.