In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
13 、 Sys. Dm_hadr_availability_replica_states
A row is returned for each local replica and for each remote replica that is in the same AlwaysOn availability group as the local replica. Each line contains status information for a given copy.
important
To get information about each replica in a given availability group, query this dynamic management view on the server instance that hosts the master copy. When querying a server instance that is hosting a secondary copy of an availability group, this dynamic management view returns only the local information for that availability group.
Column name
Data type
Description
Replica_id
Uniqueidentifier
Unique identifier of the copy.
Group_id
Uniqueidentifier
Unique identifier of the availability group.
Is_local
Bit
Whether it is one of the local copies:
0 = indicates a remote secondary copy in an availability group whose primary copy is hosted by the local server instance. This value appears only at the location of the master copy.
1 = indicates the local copy. On the secondary copy, this is the only available value for the availability group to which the copy belongs.
Role
Role_desc
Tinyint
Nvarchar (60)
A local or attached remote copy of the current AlwaysOn availability group, with one of the roles:
0 = RESOLVING is parsing
1 = PRIMARY master
2 = SECONDARY assist
For more information about the AlwaysOn availability group role, see AlwaysOn availability Group Overview (SQL Server).
Operational_state
Operational_state_desc
Tinyint
Nvarchar (60)
A copy of the current operation status, one of which:
0 = PENDING_FAILOVER pending failover
1 = PENDING pending
2 = ONLINE online
3 = OFFLINE offline
4 = FAILED failed
5 = FAILED_NO_QUORUM failed, no arbitration
NULL = the copy is not local.
For more information, see roles and operational status, a later version of this topic.
Recovery_health
Recovery_health_desc
Tinyint
Nvarchar (60)
Summarizes the database_state columns of the Sys.dm_hadr_database_replica_states dynamic management view. Here are the possible values and their descriptions.
0: ONLINE_IN_PROGRESS is in progress. At least one joined database has a database state that is not ONLINE (database_state is not 0).
1: ONLINE is online. All joined databases are online in database status (database_state is 0).
NULL: is_local = 0
Synchronization_health
Synchronization_health_desc
Tinyint
Nvarchar (60)
All availability databases that reflect a summary of database synchronization status (synchronization_state) are joined (also known as replicas) and replicas (commit availability mode synchronously or asynchronously). The summary will reflect at least a healthy cumulative copy of the status database. Here are the possible values and their descriptions.
0: NOT_HEALTHY is abnormal. At least one joined database is in the NOT SYNCHRONIZING state.
1: PARTIALLY_HEALTHY is completely normal. Some replicas are not in the target synchronous state: synchronous committed copies should be synchronized and asynchronous committed copies should be synchronized.
2: HEALTHY is running normally. All replicas are in the target synchronous state: the synchronous commit copy is synchronized and the asynchronous commit copy is synchronizing.
Connected_state
Connected_state_desc
Tinyint
Nvarchar (60)
Indicates whether the secondary copy is currently connected to the primary copy. The possible values are used and described below.
0: DISCONNECTED has been disconnected. The response of the availability replica to the DISCONNECTED status depends on its role: the secondary copy is disconnected on the primary replica, if its secondary database will be marked as NOT SYNCHRONIZED waiting for the secondary copy to reconnect, and on the primary replica, once it is detected that it has been disconnected, the secondary copy attempts to reconnect to the primary replica.
1: CONNECTED connection.
Each primary copy tracks the connection status of each secondary copy in the same availability group. The secondary copy tracks only the connection status of the primary copy.
Last_connect_error_number
Int
The number of the last connection error.
Last_connect_error_description
Nvarchar (1024)
Text last_connect_error_number message.
Last_connect_error_timestamp
Datetime
A timestamp of the date and time that indicates when an error occurred in the last_connect_error_number.
Write_lease_remaining_ticks
Bigint
Roles and operational statu
The role, which reflects the status and operation status of a given availability copy, operational_state, describes whether the replica is ready to handle all client requests for availability copies of the database. The following is a summary of the operational status that can be used for each role: RESOLVING, the primary copy of, and the secondary database.
Parsing: when you are parsing an available copy in a role, the possible operational status will be shown in the following table.
Operation status
Description
PENDING_FAILOVER
Processing failover commands for the availability group.
OFFLINE
All configuration data for the availability copy has been updated on the WSFC cluster and in the local metadata, but the availability group currently lacks a master copy.
FAILED
A read failure occurred while trying to retrieve information from the WSFC cluster.
FAILED_NO_QUORUM
There is no quorum for the local WSFC node. This is a state of inference.
Master: when an availability copy performs the master role, it is currently the master copy. The possible operational status is listed in the following table.
Operation status
Description
PENDING
This is a temporary state, but the master copy may be in this state if the worker thread cannot process the request.
ONLINE
The availability group resource is already online and all database worker threads have been selected.
FAILED
Available copies cannot be read and / or written from the WSFC cluster.
Secondary database: when an availability copy performs a secondary role, it is currently a secondary copy. The possible operational status is listed in the following table.
Operation status
Description
ONLINE
The local secondary copy is connected to the primary copy.
FAILED
The local secondary copy cannot be read and / or written from the WSFC cluster.
NULL
On the primary copy, this value is returned when the row is related to a secondary copy.
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.