Distributed Availability Groups - Update
Updates a distributed availability group replication mode.
PATCH https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/distributedAvailabilityGroups/{distributedAvailabilityGroupName}?api-version=2025-01-01
URI Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
|
distributed
|
path | True |
string |
The distributed availability group name. |
|
managed
|
path | True |
string |
The name of the managed instance. |
|
resource
|
path | True |
string minLength: 1maxLength: 90 |
The name of the resource group. The name is case insensitive. |
|
subscription
|
path | True |
string (uuid) |
The ID of the target subscription. The value must be an UUID. |
|
api-version
|
query | True |
string minLength: 1 |
The API version to use for this operation. |
Request Body
| Name | Type | Description |
|---|---|---|
| properties.databases |
Databases in the distributed availability group |
|
| properties.failoverMode |
The link failover mode - can be Manual if intended to be used for two-way failover with a supported SQL Server, or None for one-way failover to Azure. |
|
| properties.instanceAvailabilityGroupName |
string |
Managed instance side availability group name |
| properties.instanceLinkRole |
Managed instance side link role |
|
| properties.partnerAvailabilityGroupName |
string |
SQL server side availability group name |
| properties.partnerEndpoint |
string |
SQL server side endpoint - IP or DNS resolvable name |
| properties.replicationMode |
Replication mode of the link |
|
| properties.seedingMode |
Database seeding mode – can be Automatic (default), or Manual for supported scenarios. |
Responses
| Name | Type | Description |
|---|---|---|
| 200 OK |
Azure operation completed successfully. |
|
| 202 Accepted |
Resource update request accepted. Headers
|
|
| Other Status Codes |
An unexpected error response. |
Security
azure_auth
Azure Active Directory OAuth2 Flow.
Type:
oauth2
Flow:
implicit
Authorization URL:
https://login.microsoftonline.com/common/oauth2/authorize
Scopes
| Name | Description |
|---|---|
| user_impersonation | impersonate your user account |
Examples
Update the distributed availability group replication mode before deleting it.
Sample request
PATCH https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/testcl/distributedAvailabilityGroups/dag?api-version=2025-01-01
{
"properties": {
"replicationMode": "Sync"
}
}
Sample response
{
"name": "dag",
"type": "Microsoft.Sql/managedInstances/distributedAvailabilityGroups",
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/testcl/distributedAvailabilityGroups/dag",
"properties": {
"distributedAvailabilityGroupName": "dag",
"replicationMode": "Sync"
}
}
Location: https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/locations/westus/distributedAvailabilityGroupsOperationResults/1f2b3c4d-5f6g-7h8i-9j0k-1l2m3n4o5p6q?api-version=2023-02-01-preview
Definitions
| Name | Description |
|---|---|
|
Certificate |
Certificate information |
|
created |
The type of identity that created the resource. |
|
Distributed |
Distributed availability group between box and Sql Managed Instance. |
|
Distributed |
Database specific information |
|
Error |
The resource management error additional info. |
|
Error |
The error detail. |
|
Error |
Error response |
|
Failover |
The link failover mode - can be Manual if intended to be used for two-way failover with a supported SQL Server, or None for one-way failover to Azure. |
|
Link |
SQL server side link role |
|
Replica |
Link connected state |
|
Replica |
Link health state |
|
Replication |
Replication mode of the link |
|
Seeding |
Database seeding mode – can be Automatic (default), or Manual for supported scenarios. |
|
system |
Metadata pertaining to creation and last modification of the resource. |
CertificateInfo
Certificate information
| Name | Type | Description |
|---|---|---|
| certificateName |
string |
The certificate name |
| expiryDate |
string (date-time) |
The certificate expiry date |
createdByType
The type of identity that created the resource.
| Value | Description |
|---|---|
| User | |
| Application | |
| ManagedIdentity | |
| Key |
DistributedAvailabilityGroup
Distributed availability group between box and Sql Managed Instance.
| Name | Type | Description |
|---|---|---|
| id |
string (arm-id) |
Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" |
| name |
string |
The name of the resource |
| properties.databases |
Databases in the distributed availability group |
|
| properties.distributedAvailabilityGroupId |
string (uuid) |
ID of the distributed availability group |
| properties.distributedAvailabilityGroupName |
string |
Name of the distributed availability group |
| properties.failoverMode |
The link failover mode - can be Manual if intended to be used for two-way failover with a supported SQL Server, or None for one-way failover to Azure. |
|
| properties.instanceAvailabilityGroupName |
string |
Managed instance side availability group name |
| properties.instanceLinkRole |
Managed instance side link role |
|
| properties.partnerAvailabilityGroupName |
string |
SQL server side availability group name |
| properties.partnerEndpoint |
string |
SQL server side endpoint - IP or DNS resolvable name |
| properties.partnerLinkRole |
SQL server side link role |
|
| properties.replicationMode |
Replication mode of the link |
|
| properties.seedingMode |
Database seeding mode – can be Automatic (default), or Manual for supported scenarios. |
|
| systemData |
Azure Resource Manager metadata containing createdBy and modifiedBy information. |
|
| type |
string |
The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" |
DistributedAvailabilityGroupDatabase
Database specific information
| Name | Type | Description |
|---|---|---|
| connectedState |
Link connected state |
|
| databaseName |
string |
The name of the database in link |
| instanceRedoReplicationLagSeconds |
integer (int32) |
Redo lag when Managed Instance link side is primary |
| instanceReplicaId |
string (uuid) |
Managed instance replica id |
| instanceSendReplicationLagSeconds |
integer (int32) |
Replication lag when Managed Instance link side is primary |
| lastBackupLsn |
string |
Last backup LSN |
| lastBackupTime |
string (date-time) |
Last backup LSN time |
| lastCommitLsn |
string |
Last commit LSN |
| lastCommitTime |
string (date-time) |
Last commit LSN time |
| lastHardenedLsn |
string |
Last hardened LSN |
| lastHardenedTime |
string (date-time) |
Last hardened LSN time |
| lastReceivedLsn |
string |
Last received LSN |
| lastReceivedTime |
string (date-time) |
Last received LSN time |
| lastSentLsn |
string |
Last sent LSN |
| lastSentTime |
string (date-time) |
Last sent LSN time |
| mostRecentLinkError |
string |
The most recent link connection error description |
| partnerAuthCertValidity |
SQL server certificate validity |
|
| partnerReplicaId |
string (uuid) |
SQL server replica id |
| replicaState |
string |
Current link state |
| seedingProgress |
string |
Seeding progress |
| synchronizationHealth |
Link health state |
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. |
FailoverModeType
The link failover mode - can be Manual if intended to be used for two-way failover with a supported SQL Server, or None for one-way failover to Azure.
| Value | Description |
|---|---|
| None |
None |
| Manual |
Manual |
LinkRole
SQL server side link role
| Value | Description |
|---|---|
| Primary |
Primary |
| Secondary |
Secondary |
ReplicaConnectedState
Link connected state
| Value | Description |
|---|---|
| DISCONNECTED |
DISCONNECTED |
| CONNECTED |
CONNECTED |
ReplicaSynchronizationHealth
Link health state
| Value | Description |
|---|---|
| NOT_HEALTHY |
NOT_HEALTHY |
| PARTIALLY_HEALTHY |
PARTIALLY_HEALTHY |
| HEALTHY |
HEALTHY |
ReplicationModeType
Replication mode of the link
| Value | Description |
|---|---|
| Async |
Async |
| Sync |
Sync |
SeedingModeType
Database seeding mode – can be Automatic (default), or Manual for supported scenarios.
| Value | Description |
|---|---|
| Automatic |
Automatic |
| Manual |
Manual |
systemData
Metadata pertaining to creation and last modification of the resource.
| Name | Type | Description |
|---|---|---|
| createdAt |
string (date-time) |
The timestamp of resource creation (UTC). |
| createdBy |
string |
The identity that created the resource. |
| createdByType |
The type of identity that created the resource. |
|
| lastModifiedAt |
string (date-time) |
The timestamp of resource last modification (UTC) |
| lastModifiedBy |
string |
The identity that last modified the resource. |
| lastModifiedByType |
The type of identity that last modified the resource. |