How do I see the progress of the job?

  • I created a job that runs a stored procedure to restore

    two databases from production to development server.

    In Step/Advanced I specified "Output File" location.

    The job normally runs 25 min. I started the job but my "output File"

    shows only:

    Job 'RESTORE_MedTurn_DATA_ON_DEV' : Step 1, 'USFPIMS_RESTORE' : Began Executing 2008-05-05 09:11:12

    It's 12 min since it started but the log hasn't been updated.

    What is the best way to see the progress of the job?

    Job History doesn't show anything on the currently running job as well.

    Is there any command to start the job with detailed logging?

    Thanks,

    Rob

  • There's not really a way tosee the progress of a job running, but the restore statement has an option STATS which you can use to print a message every time a certain percentage is done. The following will print a message after every 10%

    RESTORE DATABASE myDB

    FROM DISK= 'D:\myDb.bak'

    WITH STATS = 10

    But keep in mind when you restore large databases that no progress will be reported while SQL Server claims the necessary disk space. Only when it starts restoring the data the progress will show.

    [font="Verdana"]Markus Bohse[/font]

  • You could use the dynamic management view sys.dm_exec_requests for this. It has a column called percent_complete.

    http://msdn.microsoft.com/en-us/library/ms177648.aspx

    Ola Hallengren

    http://ola.hallengren.com

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

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