Cosmos DB
SQL Databases
Microsoft.DocumentDB/databaseAccounts/sqlDatabases
- Control plane
- Supported
- Data plane
- Emulated
- API versions
- 47 25 stable
- Ships in
- Plugin Microsoft.DocumentDB 2026.11
- Plan
- Standard and above
Data as of 2026-11-20
API versions
The API versions Locally supports for Microsoft.DocumentDB/databaseAccounts/sqlDatabases.
| API version | Status | Control plane | Data plane |
|---|---|---|---|
| 2026-07-15 | stable | Supported | Emulated |
| 2026-04-01-preview | preview | Supported | Emulated |
| 2026-03-15 | stable | Supported | Emulated |
| 2025-11-01-preview | preview | Supported | Emulated |
| 2025-10-15 | stable | Supported | Emulated |
| 2025-05-01-preview | preview | Supported | Emulated |
| 2025-04-15 | stable | Supported | Emulated |
| 2024-12-01-preview | preview | Supported | Emulated |
| 2024-11-15 | stable | Supported | Emulated |
| 2024-09-01-preview | preview | Supported | Emulated |
| 2024-08-15 | stable | Supported | Emulated |
| 2024-05-15-preview | preview | Supported | Emulated |
| 2024-05-15 | stable | Supported | Emulated |
| 2024-02-15-preview | preview | Supported | Emulated |
| 2023-11-15-preview | preview | Supported | Emulated |
| 2023-11-15 | stable | Supported | Emulated |
| 2023-09-15-preview | preview | Supported | Emulated |
| 2023-09-15 | stable | Supported | Emulated |
| 2023-04-15 | stable | Supported | Emulated |
| 2023-03-15-preview | preview | Supported | Emulated |
| 2023-03-15 | stable | Supported | Emulated |
| 2023-03-01-preview | preview | Supported | Emulated |
| 2022-11-15-preview | preview | Supported | Emulated |
| 2022-11-15 | stable | Supported | Emulated |
| 2022-08-15-preview | preview | Supported | Emulated |
| 2022-08-15 | stable | Supported | Emulated |
| 2022-05-15-preview | preview | Supported | Emulated |
| 2022-05-15 | stable | Supported | Emulated |
| 2022-02-15-preview | preview | Supported | Emulated |
| 2021-11-15-preview | preview | Supported | Emulated |
| 2021-10-15-preview | preview | Supported | Emulated |
| 2021-10-15 | stable | Supported | Emulated |
| 2021-07-01-preview | preview | Supported | Emulated |
| 2021-06-15 | stable | Supported | Emulated |
| 2021-05-15 | stable | Supported | Emulated |
| 2021-04-15 | stable | Supported | Emulated |
| 2021-04-01-preview | preview | Supported | Emulated |
| 2021-03-15 | stable | Supported | Emulated |
| 2021-03-01-preview | preview | Supported | Emulated |
| 2021-01-15 | stable | Supported | Emulated |
| 2020-09-01 | stable | Supported | Emulated |
| 2020-06-01-preview | preview | Supported | Emulated |
| 2020-04-01 | stable | Supported | Emulated |
| 2020-03-01 | stable | Supported | Emulated |
| 2019-12-12 | stable | Supported | Emulated |
| 2019-08-01-preview | preview | Supported | Emulated |
| 2019-08-01 | stable | Supported | Emulated |
Note: This is generated from the latest version of the plugin (2026.11) as of 2026-11-20, and may differ in older versions. We aim to keep this information accurate and up to date; if you find something we're missing, then please let us know.
Nested resource types
The resource types nested under Microsoft.DocumentDB/databaseAccounts/sqlDatabases. Click one to see more information.
| Resource type | Control plane | Data plane |
|---|---|---|
| Client Encryption KeysMicrosoft.DocumentDB/databaseAccounts/sqlDatabases/clientEncryptionKeys | Supported | Planned |
| ContainersMicrosoft.DocumentDB/databaseAccounts/sqlDatabases/containers | Supported | Emulated |
| Stored ProceduresMicrosoft.DocumentDB/databaseAccounts/sqlDatabases/containers/storedProcedures | Supported | Emulated |
| Container Throughput SettingsMicrosoft.DocumentDB/databaseAccounts/sqlDatabases/containers/throughputSettings | Supported | N/A |
| TriggersMicrosoft.DocumentDB/databaseAccounts/sqlDatabases/containers/triggers | Supported | Emulated |
| User Defined FunctionsMicrosoft.DocumentDB/databaseAccounts/sqlDatabases/containers/userDefinedFunctions | Supported | Emulated |
| SQL Database Throughput SettingsMicrosoft.DocumentDB/databaseAccounts/sqlDatabases/throughputSettings | Supported | N/A |
Features
- Shared throughput: containers created without their own throughput share the database's.
- Autoscale throughput on the database.
- Restoring a deleted database with
createMode: Restore, as of a timestamp or as last deleted. - Point-in-time restore of the database, its containers and items.
Limitations
SQL Databases
- Restoring a deleted database brings back every container deleted with it at this time, even ones created after the restore timestamp.
Container Throughput Settings
- Autoscale throughput doesn't scale with load at this time.
- The 400 RU/s minimum for manual throughput isn't enforced at this time.
Containers
- A cross-partition query with an aggregate inside a larger expression, or with
ORDER BYandGROUP BYtogether, can return wrong results from the .NET SDK. - Custom analyzers in a full-text policy aren't supported at this time.
- Paging with a continuation token can skip or repeat items if the container is written to between pages at this time.
- Partitions don't split or merge at this time.
ST_AREAisn't supported, andST_WITHINandST_INTERSECTSuse planar geometry, so very large shapes can give different results.
SQL Database Throughput Settings
- Autoscale throughput doesn't scale with load at this time.
- The 400 RU/s minimum for manual throughput isn't enforced at this time.
Stored Procedures
- A query inside a stored procedure can't call a user-defined function at this time.
- Stored procedures have no execution time limit at this time, so
isAcceptedis always true.
Triggers
- Pre-triggers can't use
getCollection()at this time.
User Defined Functions
- A user-defined function can't be called from a query inside a stored procedure at this time.
Examples
Runnable examples from the examples library.
Deploy a Cosmos DB SQL Database to Locally using an ARM Template
Provisions a Cosmos DB for NoSQL account and a SQL Database with 400 RU/s of provisioned throughput, into a Resource Group of your choosing.
Deploy a Cosmos DB SQL Database to Locally using a Bicep Template
Provisions a Cosmos DB for NoSQL account and a SQL Database with 400 RU/s of provisioned throughput, into a Resource Group of your choosing.
Deploy a Cosmos DB SQL Database to Locally using Terraform and the Azure/azapi provider
Provisions a Resource Group containing a Cosmos DB for NoSQL account and a SQL Database with 400 RU/s of provisioned throughput.
Deploy a Cosmos DB SQL Database to Locally using Terraform and the hashicorp/azurerm provider
Provisions a Resource Group containing a Cosmos DB for NoSQL account and a SQL Database with 400 RU/s of provisioned throughput.
Deploy a Cosmos DB SQL Database to Locally using OpenTofu and the Azure/azapi provider
Provisions a Resource Group containing a Cosmos DB for NoSQL account and a SQL Database with 400 RU/s of provisioned throughput.
Deploy a Cosmos DB SQL Database to Locally using OpenTofu and the opentofu/azurerm provider
Provisions a Resource Group containing a Cosmos DB for NoSQL account and a SQL Database with 400 RU/s of provisioned throughput.