Quantcast
Channel: SQL Server
Viewing all articles
Browse latest Browse all 3819

Blog Post: Display ETA and Percent Completed for BACKUP or RESTORE Commands

$
0
0
This code will show you the estimated time of completion and percent completed for currently running BACKUP or RESTORE commands. -- Shows both backups and restores. select session_id as 'spid' , command as 'Command' , start_time as 'StartTime' , (total_elapsed_time / 1000) / 60 as 'ElapsedMins' , cast(percent_complete as int) as '% Done' , convert(nvarchar, dateadd(ms, estimated_completion_time, current_timestamp), 120) as 'ETA' from sys.dm_exec_requests where command like '%BACKUP DATABASE%' or command like '%RESTORE DATABASE%'

Viewing all articles
Browse latest Browse all 3819

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>