T-SQL: Check progress of backup/restore

Bschelst/ February 11, 2019/ SQL-Server/ 0 comments

Backups/restores can take a lot of time, but when it’s running, you want so see the progress.
By executing the handy T-SQL code below, you can see the progress of the backups/restores on your system.

SELECT session_id as SPID, command, a.text AS Query, start_time, percent_complete, dateadd(second,estimated_completion_time/1000, getdate()) as estimated_completion_time 
FROM sys.dm_exec_requests r CROSS APPLY sys.dm_exec_sql_text(r.sql_handle) a 
Share this Post

Leave a Comment

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>