Configuring a job to check for any running jobs

  • Hi all,

    We will soon be migrating to SS2K8, and before we cutover we need take our DB's offline/into Single User mode. In order to ensure consistency we need to ensure that process waits until any running have finished.

    I have prepped a small script for the task, but would appreciate any advice on how to go further...

    Select *

    From sysjobhistory

    Where run_status <>1

    WAITFOR DELAY '00:00:10'

    Select *

    From sysjobhistory

    Where run_status <>1

    Thanks,

    Jake

Viewing 0 posts

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