USE MASTER
GO
SELECT
PERCENT_COMPLETE AS [COMPLETED (%)]
,COMMAND AS [ACTIVITY]
,START_TIME AS [ACTIVITY START TIME]
,SD.NAME AS [DATABASE NAME]
,DATEADD(MS,ESTIMATED_
COMPLETION_TIME,GETDATE()) AS [TOTAL TIME REMAINING]
,(ESTIMATED_COMPLETION_TIME/ 1000/60) AS [REMAINING TIME IN MINUTES]
,(ESTIMATED_COMPLETION_TIME/ 1000) AS [REMAINING TIME IN SECONDS]
FROM SYS.DM_EXEC_REQUESTS ER
INNER JOIN SYS.DATABASES SD
ON ER.DATABASE_ID = SD.DATABASE_ID
WHERE COMMAND LIKE '%RESTORE%'
--OR COMMAND LIKE '%BACKUP%'
AND ESTIMATED_COMPLETION_TIME > 0
GO
GO
SELECT
PERCENT_COMPLETE AS [COMPLETED (%)]
,COMMAND AS [ACTIVITY]
,START_TIME AS [ACTIVITY START TIME]
,SD.NAME AS [DATABASE NAME]
,DATEADD(MS,ESTIMATED_
,(ESTIMATED_COMPLETION_TIME/
,(ESTIMATED_COMPLETION_TIME/
FROM SYS.DM_EXEC_REQUESTS ER
INNER JOIN SYS.DATABASES SD
ON ER.DATABASE_ID = SD.DATABASE_ID
WHERE COMMAND LIKE '%RESTORE%'
--OR COMMAND LIKE '%BACKUP%'
AND ESTIMATED_COMPLETION_TIME > 0
GO