Failover Groups - Force Failover Allow Data Loss
从当前主服务器故障转移到此服务器。 此操作可能导致数据丢失。
POST https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/failoverGroups/{failoverGroupName}/forceFailoverAllowDataLoss?api-version=2025-01-01
URI 参数
| 名称 | 在 | 必需 | 类型 | 说明 |
|---|---|---|---|---|
|
failover
|
path | True |
string |
故障转移组的名称。 |
|
resource
|
path | True |
string minLength: 1maxLength: 90 |
资源组的名称。 此名称不区分大小写。 |
|
server
|
path | True |
string |
服务器的名称。 |
|
subscription
|
path | True |
string (uuid) |
目标订阅的 ID。 该值必须是 UUID。 |
|
api-version
|
query | True |
string minLength: 1 |
用于此作的 API 版本。 |
响应
| 名称 | 类型 | 说明 |
|---|---|---|
| 200 OK |
Azure 运营顺利完成。 |
|
| 202 Accepted |
已接受资源作。 标头
|
|
| Other Status Codes |
意外的错误响应。 |
安全性
azure_auth
Azure Active Directory OAuth2 Flow.
类型:
oauth2
流向:
implicit
授权 URL:
https://login.microsoftonline.com/common/oauth2/authorize
作用域
| 名称 | 说明 |
|---|---|
| user_impersonation | 模拟用户帐户 |
示例
Forced failover of a failover group allowing data loss
示例请求
POST https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-secondary-server/failoverGroups/failover-group-test-3/forceFailoverAllowDataLoss?api-version=2025-01-01
示例响应
{
"name": "failover-group-test-3",
"type": "Microsoft.Sql/servers/failoverGroups",
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-secondary-server/failoverGroups/failover-group-test-3",
"location": "Japan West",
"properties": {
"databases": [
"/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-secondary-server/databases/testdb-1",
"/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-secondary-server/databases/testdb-2"
],
"partnerServers": [
{
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-primary-server",
"location": "Japan East",
"replicationRole": "Secondary"
}
],
"readOnlyEndpoint": {
"failoverPolicy": "Disabled",
"targetServer": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-primary-server"
},
"readWriteEndpoint": {
"failoverPolicy": "Automatic",
"failoverWithDataLossGracePeriodMinutes": 120
},
"replicationRole": "Primary",
"replicationState": "CATCH_UP"
}
}
Location: /subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/locations/japanwest/failoverGroupOperationResults/11111111-1111-1111-1111-111111111111
定义
| 名称 | 说明 |
|---|---|
|
created |
创建资源的标识的类型。 |
|
Error |
资源管理错误附加信息。 |
|
Error |
错误详细信息。 |
|
Error |
错误响应 |
|
Failover |
故障转移组。 |
|
Failover |
合作伙伴服务器上的数据库辅助类型。 |
|
Failover |
故障转移组实例的只读终结点。 |
|
Failover |
故障转移组实例的读写终结点。 |
|
Failover |
故障转移组实例的本地复制角色。 |
|
Partner |
故障转移组的合作伙伴服务器信息。 |
|
Read |
故障转移组只读终结点的故障转移策略。 |
|
Read |
故障转移组的读写终结点的故障转移策略。 如果 failoverPolicy 为 Automatic,则需要 failoverWithDataLossGracePeriodMinutes。 |
|
system |
与创建和上次修改资源相关的元数据。 |
createdByType
创建资源的标识的类型。
| 值 | 说明 |
|---|---|
| User | |
| Application | |
| ManagedIdentity | |
| Key |
ErrorAdditionalInfo
资源管理错误附加信息。
| 名称 | 类型 | 说明 |
|---|---|---|
| info |
object |
附加信息。 |
| type |
string |
附加信息类型。 |
ErrorDetail
错误详细信息。
| 名称 | 类型 | 说明 |
|---|---|---|
| additionalInfo |
错误附加信息。 |
|
| code |
string |
错误代码。 |
| details |
错误详细信息。 |
|
| message |
string |
错误消息。 |
| target |
string |
错误目标。 |
ErrorResponse
错误响应
| 名称 | 类型 | 说明 |
|---|---|---|
| error |
错误对象。 |
FailoverGroup
故障转移组。
| 名称 | 类型 | 说明 |
|---|---|---|
| id |
string (arm-id) |
资源的完全限定资源 ID。 例如,“/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}” |
| location |
string |
资源位置。 |
| name |
string |
资源的名称 |
| properties.databases |
string[] (arm-id) |
故障转移组中的数据库列表。 |
| properties.partnerServers |
故障转移组的合作伙伴服务器信息列表。 |
|
| properties.readOnlyEndpoint |
故障转移组实例的只读终结点。 |
|
| properties.readWriteEndpoint |
故障转移组实例的读写终结点。 |
|
| properties.replicationRole |
故障转移组实例的本地复制角色。 |
|
| properties.replicationState |
string |
故障转移组实例的复制状态。 |
| properties.secondaryType |
合作伙伴服务器上的数据库辅助类型。 |
|
| systemData |
Azure 资源管理器 包含 createdBy 和 modifiedBy 信息的元数据。 |
|
| tags |
object |
资源标记。 |
| type |
string |
资源类型。 例如,“Microsoft。计算/虚拟机“或”Microsoft“。存储/存储账户” |
FailoverGroupDatabasesSecondaryType
合作伙伴服务器上的数据库辅助类型。
| 值 | 说明 |
|---|---|
| Geo |
地理位置 |
| Standby |
备用 |
FailoverGroupReadOnlyEndpoint
故障转移组实例的只读终结点。
| 名称 | 类型 | 说明 |
|---|---|---|
| failoverPolicy |
故障转移组只读终结点的故障转移策略。 |
|
| targetServer |
string (arm-id) |
只读终结点指向的目标伙伴服务器。 |
FailoverGroupReadWriteEndpoint
故障转移组实例的读写终结点。
| 名称 | 类型 | 说明 |
|---|---|---|
| failoverPolicy |
故障转移组的读写终结点的故障转移策略。 如果 failoverPolicy 为 Automatic,则需要 failoverWithDataLossGracePeriodMinutes。 |
|
| failoverWithDataLossGracePeriodMinutes |
integer (int32) |
尝试对读写终结点执行故障转移前的宽限期,并丢失数据。 如果 failoverPolicy 为 Automatic,则需要 failoverWithDataLossGracePeriodMinutes。 |
FailoverGroupReplicationRole
故障转移组实例的本地复制角色。
| 值 | 说明 |
|---|---|
| Primary |
主要 |
| Secondary |
次级 |
PartnerInfo
故障转移组的合作伙伴服务器信息。
| 名称 | 类型 | 说明 |
|---|---|---|
| id |
string (arm-id) |
合作伙伴服务器的资源标识符。 |
| location |
string |
合作伙伴服务器的地理位置。 |
| replicationRole |
合作伙伴服务器的复制角色。 |
ReadOnlyEndpointFailoverPolicy
故障转移组只读终结点的故障转移策略。
| 值 | 说明 |
|---|---|
| Disabled |
已禁用 |
| Enabled |
已启用 |
ReadWriteEndpointFailoverPolicy
故障转移组的读写终结点的故障转移策略。 如果 failoverPolicy 为 Automatic,则需要 failoverWithDataLossGracePeriodMinutes。
| 值 | 说明 |
|---|---|
| Manual |
手动 |
| Automatic |
自动 |
systemData
与创建和上次修改资源相关的元数据。
| 名称 | 类型 | 说明 |
|---|---|---|
| createdAt |
string (date-time) |
资源创建时间戳(UTC)。 |
| createdBy |
string |
创建资源的标识。 |
| createdByType |
创建资源的标识的类型。 |
|
| lastModifiedAt |
string (date-time) |
资源上次修改的时间戳 (UTC) |
| lastModifiedBy |
string |
上次修改资源的标识。 |
| lastModifiedByType |
上次修改资源的标识的类型。 |