You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/linux/sql-server-linux-availability-group-failover-ha.md
+30-11Lines changed: 30 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -35,7 +35,17 @@ Use the cluster management tools to failover an availability group managed by an
35
35
36
36
### Manual failover examples
37
37
38
-
Manually fail over the availability group with the external cluster management tools. Do not initiate failover with Transact-SQL.
38
+
Manually fail over the availability group with the external cluster management tools. Under normal operations, do not initiate failover with Transact-SQL. If the external cluster management tools do not respond, you can force the availability group to failover. For instructions to force the manual failover, see [Manual move when cluster tools are not responsive](#forceManual).
39
+
40
+
Complete the manual failover in two steps.
41
+
42
+
1. Move the availability group resource from the cluster node that owns the resources to a new node.
43
+
44
+
The cluster manager moves the availability group resource and adds a location constraint. This constraint configures the resource to run on the new node. You must remove this constraint in order to move either manually or automatically failover in the future.
45
+
46
+
2. Remove the location constraint.
47
+
48
+
#### 1. Manually fail over
39
49
40
50
To manually failover an availability group resource named *ag_cluster* to cluster node named *nodeName2*, run appropriate command for your distribution:
41
51
@@ -56,7 +66,7 @@ To manually failover an availability group resource named *ag_cluster* to cluste
56
66
>[!IMPORTANT]
57
67
>After you manually failover a resource, you need to remove a location constraint that is automatically added during the move.
58
68
59
-
#### Remove the location constraint
69
+
#### 2. Remove the location constraint
60
70
61
71
During a manual move, the `pcs` command `move` or `crm` command `migrate` adds a location constraint for the resource to be placed on the new target node. To see the new constraint, run the following command after manually moving the resource:
62
72
@@ -78,7 +88,6 @@ To remove the constraint run the following command.
78
88
79
89
-**RHEL/Ubuntu example**
80
90
81
-
82
91
In this example `ag_cluster-master` is the name of the resource that was moved.
####Manual move when cluster tools are not responsive
133
+
###<aname="forceManual"></a> Manual move when cluster tools are not responsive
125
134
126
135
In extreme cases, if a user cannot use the cluster management tools for interacting with the cluster (i.e. the cluster is unresponsive, cluster management tools have a faulty behaviour), the user might have to perform a failover bypassing the external cluster manager. This is not recommended for regular operations, and should be used within cases cluster is failing to execute the failover action using the cluster management tools.
Once overridden, the resource agent will use the new setting for`REQUIRED_COPIES_TO_COMMIT` and stop computing it. This means that users have to manually update it accordingly (for example, if they increase the number of replicas).
214
223
215
-
The table below describes the outcome of an outage forprimary or secondary replicasin different availability group resource configurations:
224
+
The tables below describes the outcome of an outage forprimary or secondary replicasin different availability group resource configurations:
225
+
226
+
### Availability group - 2 sync replicas
227
+
228
+
||Primary outage |One secondary replica outage
229
+
|:---|:--- |:--- |
230
+
|`REQUIRED_COPIES_TO_COMMIT=0`|User has to issue a manual FAILOVER (might have data loss) -> New primary is R/W |Primary is R/W, running exposed to data loss
231
+
|`REQUIRED_COPIES_TO_COMMIT=1`*|Cluster will automatically issue FAILOVER (no data loss) -> New primary is RO until former primary recovers and joins availability group as secondary |Primary is RO until secondary recovers
232
+
233
+
\* SQL Server resource agent for Pacemaker default behavior.
234
+
235
+
### Availability group - 3 sync replicas
216
236
217
-
|| Availability group with 2 sync replicas ||Availability Group with 3 sync replicas |||
|**Primary outage**|User has to issue a manual FAILOVER (might have data loss) -> New primary is R/W |Cluster will automatically issue FAILOVER (no data loss) -> New primary is RO until former primary recovers and joins availability group as secondary | User has to issue a manual FAILOVER (might have data loss) -> New primary is R/W | Cluster will automatically issue FAILOVER (no data loss) -> New primary is R/W |Cluster will automatically issue FAILOVER (no data loss) -> New primary is R/O until former primary recovers and joins availability group as secondary
221
-
|**One secondary replica outage**|Primary is R/W, running exposed to data loss |Primary is RO until secondary recovers |Primary is R/W | Primary is R/W Primary is RO
237
+
||Primary outage |One secondary replica outage
238
+
|:---|:--- |:--- |
239
+
|`REQUIRED_COPIES_TO_COMMIT=0`|User has to issue a manual FAILOVER (might have data loss) -> New primary is R/W |Primary is R/W
240
+
|`REQUIRED_COPIES_TO_COMMIT=1`*|Cluster will automatically issue FAILOVER (no data loss) -> New primary is RW |Primary is R/W secondary is RO
222
241
223
-
* SQL Server resource agent for Pacemaker default behavior
242
+
\* SQL Server resource agent for Pacemaker default behavior.
0 commit comments