Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to query alwayson synchronization by Sqlserver

2025-03-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)05/31 Report--

This article mainly describes how Sqlserver queries alwayson synchronization, the article is very detailed, has a certain reference value, interested friends must read it!

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;

The above is "Sqlserver how to query alwayson synchronization" all the content of this article, thank you for reading! Hope to share the content to help everyone, more relevant knowledge, welcome to pay attention to the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report