首页 > 数据库技术 > 详细

命令查看DB restore进度

时间:2015-12-16 17:22:50      阅读:487      评论:0      收藏:0      [点我收藏+]
SELECT DB_NAME(er.[database_id]) [DatabaseName],er.[session_id] AS [SessionID],er.[command] AS [CommandType]
,est.[text] [StatementText],er.[status] AS [Status],CONVERT(DECIMAL(5, 2), er.[percent_complete]) AS [Complete_Percent],
CONVERT(DECIMAL(38, 2), er.[total_elapsed_time] / 60000.00) AS [ElapsedTime_m],CONVERT(DECIMAL(38, 2),
 er.[estimated_completion_time] / 60000.00) AS [EstimatedCompletionTime_m],er.[last_wait_type] [LastWait],
 er.[wait_resource] [CurrentWait]
 FROM sys.dm_exec_requests AS er 
 INNER JOIN sys.dm_exec_sessions AS es ON er.[session_id] = es.[session_id]
 CROSS APPLY sys.dm_exec_sql_text(er.[sql_handle]) est
 WHERE er.[command] = RESTORE DATABASE   

 

命令查看DB restore进度

原文:http://www.cnblogs.com/ethan-song/p/5051441.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!