Automatically stopping all jobs prior to a system reboot?

  • I don't have control over when it gets patched and we are having issues with lost data. Any help would be greatly appreciated!

  • Hi,

    Could you not just stop the SQL Agent?

    Cath

  • I'm relativly new to SQL server, and I know we would like to do so (stop the sql agent) but I'm unsure if there are ways to do that in the event of a system shutdown. So that a job will cease, or so we could execute some code in SSIS to tidy things up..

  • Stopping the agent is a good solution only if no jobs are running at the moment (since it will prevent any jobs from starting). Stopping the agent really isn't a good way to ensure that any running jobs finish gracefully.

    You may need to disable certain jobs or their schedules to prevent them from starting and/or restarting. Once all jobs are completed, THEN disable agent.

    Depending on what data loss is occurring, you may also want to set the database(s) to restricted-user or single-user (so that external apps can't connect in and mofdify data during the maintenance).

    ----------------------------------------------------------------------------------
    Your lack of planning does not constitute an emergency on my part...unless you're my manager...or a director and above...or a really loud-spoken end-user..All right - what was my emergency again?

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply