Azure SQL Database resource limits

Overview

Azure SQL Database manages the resources available to a database using two different mechanisms: Resources Governance and Enforcement of Limits. This topic explains these two main areas of resource management.

Resource governance

One of the design goals of the Basic, Standard, Premium, and Premium RS service tiers is for Azure SQL Database to behave as if the database is running on its own machine, isolated from other databases. Resource governance emulates this behavior. If the aggregated resource utilization reaches the maximum available CPU, Memory, Log I/O, and Data I/O resources assigned to the database, resource governance queues queries in execution and assign resources to the queued queries as they free up.

As on a dedicated machine, utilizing all available resources results in a longer execution of currently executing queries, which can result in command timeouts on the client. Applications with aggressive retry logic and applications that execute queries against the database with a high frequency can encounter errors messages when trying to execute new queries when the limit of concurrent requests has been reached.

Recommendations:

Monitor the resource utilization and the average response times of queries when nearing the maximum utilization of a database. When encountering higher query latencies you generally have three options:

  1. Reduce the number of incoming requests to the database to prevent timeout and the pile up of requests.
  2. Assign a higher performance level to the database.
  3. Optimize queries to reduce the resource utilization of each query. For more information, see the Query Tuning/Hinting section in the Azure SQL Database Performance Guidance article.

Enforcement of limits

Resources other than CPU, Memory, Log I/O, and Data I/O are enforced by denying new requests when limits are reached. When a database reaches the configured maximum size limit, inserts and updates that increase data size fail, while selects and deletes continue to work. Clients receive an error message depending on the limit that has been reached.

For example, the number of connections to a SQL database and the number of concurrent requests that can be processed are restricted. SQL Database allows the number of connections to the database to be greater than the number of concurrent requests to support connection pooling. While the number of connections that are available can easily be controlled by the application, the number of parallel requests is often times harder to estimate and to control. Especially during peak loads when the application either sends too many requests or the database reaches its resource limits and starts piling up worker threads due to longer running queries, errors can be encountered.

Service tiers and performance levels

There are service tiers and performance levels for both single database and elastic pools.

Single databases

For a single database, the limits of a database are defined by the database service tier and performance level. The following table describes the characteristics of Basic, Standard, Premium, and Premium RS databases at varying performance levels.

Basic service tier

Performance level Basic
Max DTUs 5
Max database size* 2 GB
Max in-memory OLTP storage N/A
Max concurrent workers (requests) 30
Max concurrent logins 30
Max concurrent sessions 300

Standard service tier

Performance level S0 S1 S2 S3
Max DTUs 10 20 50 100
Max database size* 250 GB 250 GB 250 GB 250 GB
Max in-memory OLTP storage N/A N/A N/A N/A
Max concurrent workers (requests) 60 90 120 200
Max concurrent logins 60 90 120 200
Max concurrent sessions 600 900 1200 2400

Premium service tier

Performance level P1 P2 P4 P6 P11 P15
Max DTUs 125 250 500 1000 1750 4000
Max database size* 500 GB 500 GB 500 GB 500 GB 4 TB 4 TB
Max in-memory OLTP storage 1 GB 2 GB 4 GB 8 GB 14 GB 32 GB
Max concurrent workers (requests) 200 400 800 1600 2400 6400
Max concurrent logins 200 400 800 1600 2400 6400
Max concurrent sessions 30000 30000 30000 30000 30000 30000

Premium RS service tier

Performance level PRS1 PRS2 PRS4 PRS6
Max DTUs 125 250 500 1000
Max database size* 500 GB 500 GB 500 GB 500 GB
Max in-memory OLTP storage 1 GB 2 GB 4 GB 8 GB
Max concurrent workers (requests) 200 400 800 1600
Max concurrent logins 200 400 800 1600
Max concurrent sessions 30000 30000 30000 30000

* Max database size refers to the maximum size of the data in the database.

Important

Customers using P11 and P15 performance levels can use up to 4 TB of included storage at no additional charge. This 4 TB option is currently available in the following regions: US East2, West US, US Gov Virginia, West Europe, Germany Central, South East Asia, Japan East, Australia East, Canada Central, and Canada East.

Elastic pools

Elastic pools share resources across databases in the pool. The following table describes the characteristics of Basic, Standard, Premium, and Premium RS elastic pools.

Basic elastic pool limits

Pool size (eDTUs) 50 100 200 300 400 800 1200 1600
Max data storage per pool* 5 GB 10 GB 20 GB 29 GB 39 GB 78 GB 117 GB 156 GB
Max In-Memory OLTP storage per pool N/A N/A N/A N/A N/A N/A N/A N/A
Max number DBs per pool 100 200 500 500 500 500 500 500
Max concurrent workers (requests) per pool 100 200 400 600 800 1600 2400 3200
Max concurrent logins per pool 100 200 400 600 800 1600 2400 3200
Max concurrent sessions per pool 30000 30000 30000 30000 30000 30000 30000 30000
Min eDTUs per database 0, 5 0, 5 0, 5 0, 5 0, 5 0, 5 0, 5 0, 5
Max eDTUs per database 5 5 5 5 5 5 5 5
Max data storage per database 2 GB 2 GB 2 GB 2 GB 2 GB 2 GB 2 GB 2 GB

Standard elastic pool limits

Pool size (eDTUs) 50 100 200** 300** 400** 800**
Max data storage per pool* 50 GB 100 GB 200 GB 300 GB 400 GB 800 GB
Max In-Memory OLTP storage per pool N/A N/A N/A N/A N/A N/A
Max number DBs per pool 100 200 500 500 500 500
Max concurrent workers (requests) per pool 100 200 400 600 800 1600
Max concurrent logins per pool 100 200 400 600 800 1600
Max concurrent sessions per pool 30000 30000 30000 30000 30000 30000
Min eDTUs per database** 0, 10, 20, 50 0, 10, 20, 50, 100 0, 10, 20, 50, 100, 200 0, 10, 20, 50, 100, 200, 300 0, 10, 20, 50, 100, 200, 300, 400 0, 10, 20, 50, 100, 200, 300, 400, 800
Max eDTUs per database** 10, 20, 50 10, 20, 50, 100 10, 20, 50, 100, 200 10, 20, 50, 100, 200, 300 10, 20, 50, 100, 200, 300, 400 10, 20, 50, 100, 200, 300, 400, 800
Max data storage per database 50 GB 100 GB 200 GB 250 GB 250 GB 250 GB

Standard elastic pool limits (continued)

Pool size (eDTUs) 1200** 1600** 2000** 2500** 3000**
Max data storage per pool* 1.2 TB 1.6 TB 2 TB 2.4 TB 2.9 TB
Max In-Memory OLTP storage per pool N/A N/A N/A N/A N/A
Max number DBs per pool 500 500 500 500 500
Max concurrent workers (requests) per pool 2400 3200 4000 5000 6000
Max concurrent logins per pool 2400 3200 4000 5000 6000
Max concurrent sessions per pool 30000 30000 30000 30000 30000
Min eDTUs per database** 0, 10, 20, 50, 100, 200, 300, 400, 800, 1200 0, 10, 20, 50, 100, 200, 300, 400, 800, 1200, 1600 0, 10, 20, 50, 100, 200, 300, 400, 800, 1200, 1600, 2000 0, 10, 20, 50, 100, 200, 300, 400, 800, 1200, 1600, 2000, 2500 0, 10, 20, 50, 100, 200, 300, 400, 800, 1200, 1600, 2000, 2500, 3000
Max eDTUs per database** 10, 20, 50, 100, 200, 300, 400, 800, 1200 10, 20, 50, 100, 200, 300, 400, 800, 1200, 1600 10, 20, 50, 100, 200, 300, 400, 800, 1200, 1600, 2000 10, 20, 50, 100, 200, 300, 400, 800, 1200, 1600, 2000, 2500 10, 20, 50, 100, 200, 300, 400, 800, 1200, 1600, 2000, 2500, 3000
Max data storage per database 250 GB 250 GB 250 GB 250 GB 250 GB

Premium elastic pool limits

Pool size (eDTUs) 125 250 500 1000 1500***
Max data storage per pool* 250 GB 500 GB 750 GB 1 TB 1.5 TB
Max In-Memory OLTP storage per pool 1 GB 2 GB 4 GB 10 GB 12 GB
Max number DBs per pool 50 100 100 100 100
Max concurrent workers per pool (requests) 200 400 800 1600 2400
Max concurrent logins per pool 200 400 800 1600 2400
Max concurrent sessions per pool 30000 30000 30000 30000 30000
Min eDTUs per database 0, 25, 50, 75, 125 0, 25, 50, 75, 125, 250 0, 25, 50, 75, 125, 250, 500 0, 25, 50, 75, 125, 250, 500, 1000 0, 25, 50, 75, 125, 250, 500, 1000
Max eDTUs per database 25, 50, 75, 125 25, 50, 75, 125, 250 25, 50, 75, 125, 250, 500 25, 50, 75, 125, 250, 500, 1000 25, 50, 75, 125, 250, 500, 1000
Max data storage per database 250 GB 500 GB 500 GB 500 GB 500 GB

Premium elastic pool limits (continued)

Pool size (eDTUs) 2000*** 2500*** 3000*** 3500*** 4000***
Max data storage per pool* 2 TB 2.5 TB 3 TB 3.5 TB 4 TB
Max In-Memory OLTP storage per pool 16 GB 20 GB 24 GB 28 GB 32 GB
Max number DBs per pool 100 100 100 100 100
Max concurrent workers (requests) per pool 3200 4000 4800 5600 6400
Max concurrent logins per pool 3200 4000 4800 5600 6400
Max concurrent sessions per pool 30000 30000 30000 30000 30000
Min eDTUs per database 0, 25, 50, 75, 125, 250, 500, 1000, 1750 0, 25, 50, 75, 125, 250, 500, 1000, 1750 0, 25, 50, 75, 125, 250, 500, 1000, 1750 0, 25, 50, 75, 125, 250, 500, 1000, 1750 0, 25, 50, 75, 125, 250, 500, 1000, 1750, 4000
Max eDTUs per database 25, 50, 75, 125, 250, 500, 1000, 1750 25, 50, 75, 125, 250, 500, 1000, 1750 25, 50, 75, 125, 250, 500, 1000, 1750 25, 50, 75, 125, 250, 500, 1000, 1750 25, 50, 75, 125, 250, 500, 1000, 1750, 4000
Max data storage per database 500 GB 500 GB 500 GB 500 GB 500 GB

Premium RS elastic pool limits

Pool size (eDTUs) 125 250 500 1000
Max data storage per pool* 250 GB 500 GB 750 GB 750 GB
Max In-Memory OLTP storage per pool 1 GB 2 GB 4 GB 10 GB
Max number DBs per pool 50 100 100 100
Max concurrent workers (requests) per pool 200 400 800 1600
Max concurrent logins per pool 200 400 800 1600
Max concurrent sessions per pool 30000 30000 30000 30000
Min eDTUs per database 0, 25, 50, 75, 125 0, 25, 50, 75, 125, 250 0, 25, 50, 75, 125, 250, 500 0, 25, 50, 75, 125, 250, 500, 1000
Max eDTUs per database 25, 50, 75, 125 25, 50, 75, 125, 250 25, 50, 75, 125, 250, 500 25, 50, 75, 125, 250, 500, 1000
Max data storage per database 250 GB 500 GB 500 GB 500 GB
Important

* Pooled databases share pool storage, so data storage in an elastic pool is limited to the smaller of the remaining pool storage or max storage per database.

** Min/max eDTUs per database starting at 200 eDTUs and higher is in public preview.

*** The default max data storage per pool for Premium pools with 500 eDTUs or more is 750 GB. To obtain the higher max data storage size per Premium pool for 1000 or more eDTUs, this size must be explicitly selected using the Azure portal, PowerShell, the Azure CLI, or the REST API. Premium pools with more than 1000 TB of storage is currently in public preview in the following regions: US East2, West US, US Gov Virginia, West Europe, Germany Central, South East Asia, Japan East, Australia East, Canada Central, and Canada East. The max storage per pool for all other regions is currently limited to 750 GB.

For an expanded definition of each resource listed in the previous tables, see the descriptions in Service tier capabilities and limits. For an overview of service tiers, see Azure SQL Database Service Tiers and Performance Levels.

Other SQL Database limits

Area Limit Description
Databases using Automated export per subscription 10 Automated export allows you to create a custom schedule for backing up your SQL databases. The preview of this feature will end on March 1, 2017.
Databases per server Up to 5000 Up to 5000 databases are allowed per server.
DTUs per server 45000 45000 DTUs are allowed per server for provisioning standalone databases and elastic pools. The total number of standalone databases and pools allowed per server is limited only by the number of server DTUs.
Important

Azure SQL Database Automated Export is now in preview and will be retired on March 1, 2017. Starting December 1st, 2016, you will no longer be able to configure automated export on any SQL database. All your existing automated export jobs will continue to work until March 1st, 2017. After December 1st, 2016, you can use long-term backup retention or Azure Automation to archive SQL databases periodically using PowerShell periodically according to a schedule of your choice. For a sample script, you can download the sample script from GitHub.

Resources

Azure Subscription and Service Limits, Quotas, and Constraints

Azure SQL Database Service Tiers and Performance Levels

Error messages for SQL Database client programs