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

SQL Server 2017 AlwaysOn on Linux configuration and maintenance (13)

2025-01-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

2.4.2 forced failover

Forced failover is strictly restricted for disaster recovery. If the cluster fails to respond due to a disaster in the primary data center, you cannot use cluster management tools to interact with the cluster, and you may need to force a failover to bypass the external cluster administrator.

Verify that AG resources are no longer managed by the cluster

Set the resource to unmanaged mode on the target cluster node. This command causes the resource agent to stop resource monitoring and management.

Sudo pcs resource unmanage

If the attempt to set the resource to unmanaged mode fails, delete the resource.

Sudo pcs resource delete

Note: when you delete a resource, you also delete all related constraints.

In the SQL Server instance that hosts the secondary copy, set the session context variable external_cluster

EXEC sp_set_session_context @ key = Noble externalized clusterships, @ value = ignorances'

Connect to the SQL Server instance that hosts the secondary copy of the target and use Transact SQL to perform AG failover

ALTER AVAILABILITY GROUP FORCE_FAILOVER_ALLOW_DATA_LOSS

After a forced failover, bring the AG to health before restarting cluster resource monitoring and managing or rebuilding AG resources. Reference: important tasks after forced failover.

Or restart cluster resource monitoring and management

Run the following command to restart cluster resource monitoring and management:

Sudo pcs resource manage sudo pcs resource cleanup

If the cluster resource is deleted, recreate it.

Reference: create AG resources.

Important: do not use the above steps in disaster recovery walkthroughs as they may lose data. Instead, change the asynchronous copy to synchronous and follow the regular manual failover guidelines.

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