canonical: https://jentic.com/apis/azure.com/azure-sql-database-disaster-recovery-configuration

# Microsoft Azure Azure SQL Database disaster recovery configurations

Jentic publishes the only available OpenAPI specification for Azure SQL Database disaster recovery configurations, keeping it validated and agent-ready. The API provisions and manages disaster recovery configurations on Azure SQL Database servers, allowing agents to inspect a server's DR configuration, create or remove a recovery pairing, and trigger failover or forced failover that allows data loss. It targets the Microsoft.Sql resource provider on the Azure Resource Manager control plane and is intended for high-availability automation across regions, not for routine database query or schema work.

## For AI agents

Provision, inspect, and trigger failover on Azure SQL Database disaster recovery configurations across paired regions.

## Scope

Does not handle database query, schema management, or backup restore - use for server-level disaster recovery pairings and failover only.

## Capabilities

- Retrieve the disaster recovery configuration attached to a SQL server
- Create or update a named disaster recovery pairing between two SQL servers
- Delete a disaster recovery configuration to break the pairing
- Trigger a planned failover to the secondary region
- Force failover with potential data loss when the primary is unreachable
- Audit current DR pairings across a subscription's SQL servers

## Use cases

### Cross-region failover for Azure SQL

Trigger a planned failover of an Azure SQL Database to its paired region during a regional outage or disaster recovery drill. The API exposes a dedicated failover operation under the disasterRecoveryConfiguration resource and a separate forceFailoverAllowDataLoss operation for unreachable primaries. Use this when an operator or automation needs to switch traffic to the secondary within minutes without rebuilding replication from scratch.

Example prompt: POST to /subscriptions/{subscriptionId}/resourceGroups/{rg}/providers/Microsoft.Sql/servers/{serverName}/disasterRecoveryConfiguration/{drcName}/failover and confirm the configuration status returns to Ready

### Provision a DR pairing for a new SQL server

Create a named disaster recovery configuration that pairs a primary Azure SQL server with a secondary in another region. The PUT operation on disasterRecoveryConfiguration/{disasterRecoveryConfigurationName} establishes the pairing as part of an environment bring-up workflow. Use this to bake DR into infrastructure-as-code provisioning rather than configuring it manually after the fact.

Example prompt: PUT a disasterRecoveryConfiguration named primary-to-secondary on serverA and verify the resource appears in the GET list for that server

### DR readiness audit

Walk every SQL server in a subscription and report which have a disaster recovery configuration attached and which do not. The GET operation on the disasterRecoveryConfiguration collection returns the current pairing if one exists, making it the source of truth for compliance audits. Useful for compliance teams who need to evidence that production servers have DR in place.

Example prompt: Iterate over every SQL server in subscriptionId X, GET its disasterRecoveryConfiguration, and emit a CSV of servers missing a DR pairing

### Agent-driven incident response

Allow an AI agent to respond to a regional outage alert by checking DR state and initiating failover without a human operator. Through Jentic, the agent searches for the failover operation by intent, loads the input schema, and executes against the right resource path with scoped credentials. Removes the need to memorise long Microsoft.Sql resource paths.

Example prompt: Search Jentic for 'fail over azure sql disaster recovery configuration', load the operation schema, and execute against the named DR configuration

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| GET | /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/disasterRecoveryConfiguration | List DR configurations on a server |
| GET | /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/disasterRecoveryConfiguration/{disasterRecoveryConfigurationName} | Get a named DR configuration |
| PUT | /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/disasterRecoveryConfiguration/{disasterRecoveryConfigurationName} | Create or update a DR pairing |
| DELETE | /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/disasterRecoveryConfiguration/{disasterRecoveryConfigurationName} | Delete a DR pairing |
| POST | /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/disasterRecoveryConfiguration/{disasterRecoveryConfigurationName}/failover | Trigger planned failover to secondary |
| POST | /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/disasterRecoveryConfiguration/{disasterRecoveryConfigurationName}/forceFailoverAllowDataLoss | Force failover with possible data loss |

## Key resources

- **disasterRecoveryConfiguration** — Read, create, update, or delete a named DR pairing on a SQL server
- **failover** — Trigger a planned failover to the secondary
- **forceFailoverAllowDataLoss** — Force failover when the primary is unreachable, accepting possible data loss

## Why Jentic

- **Setup:** Wiring the Azure SQL disaster recovery API by hand means registering an Azure AD app, minting bearer tokens for https://management.azure.com/, and polling the Azure-AsyncOperation header on long-running failover calls while handling ARM throttling yourself. Through Jentic you install once, import Azure SQL Database disaster recovery configurations from the API Directory, store the Azure AD credential once, and your agent calls it.
- **Permission scoping:** The server and configuration ids travel in the URL path (/servers/{serverName}/disasterRecoveryConfiguration/{disasterRecoveryConfigurationName}/...), so a rule can pin your agent to one server: it can read the DR configuration there and nothing else. You choose the operations it may call, so ones like forced failover with possible data loss or deleting a DR pairing are not included unless you add them.
- **Credential handling:** Your Azure AD credential is stored once, encrypted, by your own Jentic One instance and exchanged for a short-lived bearer token at execution time. It never enters the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'fail over an Azure SQL disaster recovery configuration' or 'set up a DR pairing between two SQL servers', and Jentic returns the matching Microsoft.Sql disasterRecoveryConfiguration operation with its input schema so the agent calls the right endpoint without browsing the ARM reference.

## Related APIs

- **Azure SQL Database replication links** — Manages per-database replication links that DR configurations sit on top of
- **Azure SQL Database backup** — Manages point-in-time backups that supplement DR pairings
- **Azure SQL Server API spec** — Manages server-level connection policy on the same Microsoft.Sql/servers resource

## FAQ

### Why is there no official OpenAPI spec for Azure SQL Database disaster recovery configurations?

Microsoft Azure does not publish an OpenAPI specification. Jentic generates and maintains this spec so that AI agents and developers can call Azure SQL Database disaster recovery configurations via structured tooling. It is validated against the live API and kept up to date. Get started with Jentic One, the self-hosted execution layer.

### What authentication does the Azure SQL Database disaster recovery configurations API use?

The API uses Azure AD OAuth 2.0 with the implicit flow, scoped to user_impersonation against management.azure.com. Through Jentic, the bearer token is held in your Jentic One instance and exchanged for a scoped access token at execution time, so raw refresh tokens never enter the agent's context.

### Can I trigger a failover with this API?

Yes. Two POST operations exist: /failover for a planned switch to the secondary and /forceFailoverAllowDataLoss for the case where the primary is unreachable. Both target a named disasterRecoveryConfiguration on a specific Microsoft.Sql server.

### What are the rate limits for this API?

Azure Resource Manager applies tenant-level throttling - typically 12,000 reads and 1,200 writes per hour per subscription, with subresource limits documented per provider. DR failover operations are long-running and return 202 Accepted; poll the Azure-AsyncOperation header to track completion.

### How do I create a DR pairing through Jentic?

Run pip install jentic, then search for 'configure azure sql disaster recovery'. Jentic returns the PUT operation on /disasterRecoveryConfiguration/{name}, loads the request schema, and executes it with the subscription, resource group, and server names you supply.

### Does this API work for Azure SQL Managed Instance?

No. This spec covers disaster recovery configurations on Microsoft.Sql/servers only. Managed Instance disaster recovery uses a separate failover groups API under the same provider.

### Can I limit what my agent is allowed to do with the Azure SQL Database disaster recovery configurations API?

Yes. Because you run Jentic One yourself, your own rules decide which operations and credentials the agent may use. The server and configuration names travel in the URL path, so you can pin the agent to a single SQL server and let it only read the disaster recovery configuration there. You choose which operations it can call, so high-impact ones like forced failover with possible data loss or deleting a DR pairing are excluded unless you explicitly add them.
