码迷,mamicode.com
首页 > 数据库 > 详细

SQL Server 2012 AlwaysON 同步延迟时间

时间:2015-09-06 18:10:21      阅读:1506      评论:0      收藏:0      [点我收藏+]

标签:

 

SELECT  availability_mode_desc ,
        role_desc ,
        replica_server_name ,
        last_redone_time ,
        GETDATE() now ,
        DATEDIFF(ms, last_redone_time, GETDATE()) diffMS
FROM    ( ( sys.availability_groups AS ag
            JOIN sys.availability_replicas AS ar ON ag.group_id = ar.group_id
          )
          JOIN sys.dm_hadr_availability_replica_states AS ar_state ON ar.replica_id = ar_state.replica_id
        )
        JOIN sys.dm_hadr_database_replica_states dr_state ON ag.group_id = dr_state.group_id
                                                             AND dr_state.replica_id = ar_state.replica_id;

  

SQL Server 2012 AlwaysON 同步延迟时间

标签:

原文地址:http://www.cnblogs.com/zping/p/4786387.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!