Restore progress

  • We are restoring large database with replace option. How to check it's progress, like with some sys.table or so?

  • This should help

    selectst.text,

    command,

    db_name(database_id),

    start_time,

    DATEADD(ms,estimated_completion_time,

    GETDATE()) AS EstimatedEndTime,

    percent_complete,

    ((estimated_completion_time / 1000) / 60) as EstCominMins,

    ((total_elapsed_time / 1000) / 60) as ElapsedMins,

    reads,

    writes

    from sys.dm_exec_requests er

    CROSS APPLY sys.dm_exec_sql_text(er.sql_handle) as st

    where command like 'Backup%' or command like 'restore%'

    order by command

    -----------------------------------------------------------------------------------------------------------

    "Ya can't make an omelette without breaking just a few eggs" 😉

  • That's amazing! Thanks a lot, Perry. Actually I can use it not only for backups or restores, but for anything else.

  • SQL Guy 1 (3/28/2011)


    That's amazing! Thanks a lot, Perry. Actually I can use it not only for backups or restores, but for anything else.

    You're welcome

    -----------------------------------------------------------------------------------------------------------

    "Ya can't make an omelette without breaking just a few eggs" 😉

  • If you are restoring through a script then you can also use the option... WITH STATS = 5 or any other number....

  • you could do, but the script above supplies a lot more detail

    -----------------------------------------------------------------------------------------------------------

    "Ya can't make an omelette without breaking just a few eggs" 😉

Viewing 6 posts - 1 through 5 (of 5 total)

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