How to evaluate estimated Time for Backup / Restore in SQL Server?

This script can be used to find the estimated time of backup and restore that is on progress in your SQL Server. This script is applicable for SQL server 2005 and above.

Script:

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
WHERE r.command in ('BACKUP DATABASE','RESTORE DATABASE')

Sample Output:

How to evaluate estimated Time for Backup / Restore in SQL Server?


<<Click here to see all posts>>

If you found any of the information on this page helpful in anyway then please consider sharing this content with your favorite social network or by leaving your thoughts in the comment section. Thanks!

Leave a Reply

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

Prove You Are Human Time limit is exhausted. Please reload CAPTCHA.