Backup and restore command ETA Status

Tuesday, April 20, 2021

Whenever  doing  restoration and backup task for big databases it is difficult to give an ETA to stakeholders. The below command helps to get the status at percent level of completion along with estimate completion time.

Script:--- select d.name,percent_complete, dateadd(second,estimated_completion_time/1000, getdate()) as estimated_completion_time, Getdate() as now, datediff(minute, start_time, getdate()) as running, estimated_completion_time/1000/60 as togo, start_time, command from sys.dm_exec_requests req inner join sys.sysdatabases d on d.dbid = req.database_id where req.command in ('RESTORE DATABASE', 'BACKUP DATABASE', 'RESTORE LOG', 'BACKUP LOG') Output:- Untitled

No items found.