sql Estimate Backup ETA

SELECT
	percent_complete AS 'PctComplete',
	start_time AS 'StartTime',
	command AS 'Command',
	b.name AS 'DatabaseName',
	DATEADD(ms,estimated_completion_time,GETDATE()) AS 'EstimatedEndTime',
	(estimated_completion_time/1000/60) AS 'EstimatedMinutesToEnd'
FROM sys.dm_exec_requests a
INNER JOIN sys.databases b 
ON a.database_id = b.database_id
WHERE command like '%backup database%'
AND estimated_completion_time > 0
Use to estimate how long a backup will take, once it has started.

Updated: Wednesday 8th June 2011, 02:02pm

There are 0 comments

Leave a comment of your own

Comments are currently closed.