DBA- How To Find Out How Much Percentage Of Database Restoration Is Done?

Sometime we run SQL Server agent jobs to restore databases. As restoration is in progress, the below query can be used to find out how much percentage of restoration is completed.


SELECT command,
       percent_complete,
       start_time,
       Txt.[text] AS Query 
FROM   sys.dm_exec_requests AS DER
       CROSS APPLY sys.Dm_exec_sql_text(DER.[sql_handle]) AS Txt
WHERE  command = 'RESTORE DATABASE'



No comments:

Post a Comment

Note: Only a member of this blog may post a comment.