Instance Failover Groups - Force Failover Allow Data Loss
Fails over from the current primary managed instance to this managed instance. This operation might result in data loss.
POST https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/instanceFailoverGroups/{failoverGroupName}/forceFailoverAllowDataLoss?api-version=2023-08-01
URI Parameters
Name | In | Required | Type | Description |
---|---|---|---|---|
failover
|
path | True |
string |
The name of the failover group. |
location
|
path | True |
string |
The name of the region where the resource is located. |
resource
|
path | True |
string |
The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. |
subscription
|
path | True |
string |
The subscription ID that identifies an Azure subscription. |
api-version
|
query | True |
string |
The API version to use for the request. |
Responses
Name | Type | Description |
---|---|---|
200 OK |
Successfully failed over. |
|
202 Accepted |
Accepted Headers Location: string |
|
Other Status Codes |
*** Error Responses: ***
|
Examples
Forced failover of a failover group allowing data loss
Sample request
POST https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/locations/Japan West/instanceFailoverGroups/failover-group-test-3/forceFailoverAllowDataLoss?api-version=2023-08-01
Sample response
{
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/locations/JapanWest/instanceFailoverGroups/failover-group-test-3",
"name": "failover-group-test-3",
"type": "Microsoft.Sql/locations/instanceFailoverGroups",
"properties": {
"readWriteEndpoint": {
"failoverPolicy": "Automatic",
"failoverWithDataLossGracePeriodMinutes": 480
},
"readOnlyEndpoint": {
"failoverPolicy": "Disabled"
},
"replicationRole": "Primary",
"replicationState": "CATCH_UP",
"partnerRegions": [
{
"location": "Japan East",
"replicationRole": "Secondary"
}
],
"managedInstancePairs": [
{
"primaryManagedInstanceId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/failover-group-secondary-mngdInstance",
"partnerManagedInstanceId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/failover-group-primary-mngdInstance"
}
],
"secondaryType": "Geo"
}
}
Location: https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/locations/JapanWest/instanceFailoverGroupOperationResults/failover-group-test-3?api-version=2022-05-01-preview
Definitions
Name | Description |
---|---|
Error |
The resource management error additional info. |
Error |
The error detail. |
Error |
Error response |
Instance |
An instance failover group. |
Instance |
Read-only endpoint of the failover group instance. |
Instance |
Read-write endpoint of the failover group instance. |
Instance |
Local replication role of the failover group instance. |
Managed |
Pairs of Managed Instances in the failover group. |
Partner |
Partner region information for the failover group. |
Read |
Failover policy of the read-only endpoint for the failover group. |
Read |
Failover policy of the read-write endpoint for the failover group. If failoverPolicy is Automatic then failoverWithDataLossGracePeriodMinutes is required. |
Secondary |
Type of the geo-secondary instance. Set 'Standby' if the instance is used as a DR option only. |
ErrorAdditionalInfo
The resource management error additional info.
Name | Type | Description |
---|---|---|
info |
object |
The additional info. |
type |
string |
The additional info type. |
ErrorDetail
The error detail.
Name | Type | Description |
---|---|---|
additionalInfo |
The error additional info. |
|
code |
string |
The error code. |
details |
The error details. |
|
message |
string |
The error message. |
target |
string |
The error target. |
ErrorResponse
Error response
Name | Type | Description |
---|---|---|
error |
The error object. |
InstanceFailoverGroup
An instance failover group.
Name | Type | Description |
---|---|---|
id |
string |
Resource ID. |
name |
string |
Resource name. |
properties.managedInstancePairs |
List of managed instance pairs in the failover group. |
|
properties.partnerRegions |
Partner region information for the failover group. |
|
properties.readOnlyEndpoint |
Read-only endpoint of the failover group instance. |
|
properties.readWriteEndpoint |
Read-write endpoint of the failover group instance. |
|
properties.replicationRole |
Local replication role of the failover group instance. |
|
properties.replicationState |
string |
Replication state of the failover group instance. |
properties.secondaryType |
Type of the geo-secondary instance. Set 'Standby' if the instance is used as a DR option only. |
|
type |
string |
Resource type. |
InstanceFailoverGroupReadOnlyEndpoint
Read-only endpoint of the failover group instance.
Name | Type | Description |
---|---|---|
failoverPolicy |
Failover policy of the read-only endpoint for the failover group. |
InstanceFailoverGroupReadWriteEndpoint
Read-write endpoint of the failover group instance.
Name | Type | Description |
---|---|---|
failoverPolicy |
Failover policy of the read-write endpoint for the failover group. If failoverPolicy is Automatic then failoverWithDataLossGracePeriodMinutes is required. |
|
failoverWithDataLossGracePeriodMinutes |
integer (int32) |
Grace period before failover with data loss is attempted for the read-write endpoint. If failoverPolicy is Automatic then failoverWithDataLossGracePeriodMinutes is required. |
InstanceFailoverGroupReplicationRole
Local replication role of the failover group instance.
Value | Description |
---|---|
Primary | |
Secondary |
ManagedInstancePairInfo
Pairs of Managed Instances in the failover group.
Name | Type | Description |
---|---|---|
partnerManagedInstanceId |
string |
Id of Partner Managed Instance in pair. |
primaryManagedInstanceId |
string |
Id of Primary Managed Instance in pair. |
PartnerRegionInfo
Partner region information for the failover group.
Name | Type | Description |
---|---|---|
location |
string |
Geo location of the partner managed instances. |
replicationRole |
Replication role of the partner managed instances. |
ReadOnlyEndpointFailoverPolicy
Failover policy of the read-only endpoint for the failover group.
Value | Description |
---|---|
Disabled | |
Enabled |
ReadWriteEndpointFailoverPolicy
Failover policy of the read-write endpoint for the failover group. If failoverPolicy is Automatic then failoverWithDataLossGracePeriodMinutes is required.
Value | Description |
---|---|
Automatic | |
Manual |
SecondaryInstanceType
Type of the geo-secondary instance. Set 'Standby' if the instance is used as a DR option only.
Value | Description |
---|---|
Geo | |
Standby |