2/17/17

Really, is the backup running?

Yes, and now you launched all those backup statements, and you wonder when they are done...
This simple Query might help you a bit.

SELECT
 session_id,
 request_id,
 command,
 d.name as database_name,
 start_time,
 DATEDIFF(SECOND, start_time, GETDATE()) AS elapsed_time_in_seconds,
 percent_complete AS estimated_percent_complete,
 DATEADD(SECOND, ROUND(DATEDIFF(SECOND, start_time, GETDATE()) / percent_complete * 100.0, 0), start_time) AS estimated_finish_time
FROM sys.dm_exec_requests r INNER JOIN sys.databases d ON r.database_id = d.database_id WHERE command LIKE '%BACKUP%' OR command LIKE '%RESTORE%'

No comments:

Post a Comment