您现在访问的是微软AZURE全球版技术文档网站,若需要访问由世纪互联运营的MICROSOFT AZURE中国区技术文档网站,请访问 https://docs.azure.cn.

Azure SQL 数据库资源限制Azure SQL Database resource limits

单一数据库:存储大小和性能级别Single database: Storage sizes and performance levels

对于单一数据库,下表显示了可用于每个服务层和性能级别的单一数据库的资源。For single databases, the following tables show the resources available for a single database at each service tier and performance level. 可通过 Azure 门户Transact-SQLPowerShellAzure CLIREST API 为单一数据库设置服务层、性能级别和存储量。You can set the service tier, performance level, and storage amount for a single database using the Azure portal, Transact-SQL, PowerShell, the Azure CLI, or the REST API.

基本服务层Basic service tier

性能级别Performance level 基本Basic
最大 DTU 数Max DTUs 55
包含的存储 (GB)Included storage (GB) #N/A2
最大存储选择 (GB)Max storage choices (GB) #N/A2
最大内存中 OLTP 存储 (GB)Max in-memory OLTP storage (GB) 不适用N/A
最大并发工作线程数(请求数)Max concurrent workers (requests) 3030
最大并发登录数Max concurrent logins 3030
最大并发会话数Max concurrent sessions 300300

标准服务层Standard service tier

性能级别Performance level S0S0 S1S1 S2S2 S3S3
最大 DTU 数Max DTUs 1010 2020 5050 100100
包含的存储 (GB)Included storage (GB) 250250 250250 250250 250250
最大存储选择 (GB)Max storage choices (GB) 250250 250250 250250 250, 500, 750, 1024250, 500, 750, 1024
最大内存中 OLTP 存储 (GB)Max in-memory OLTP storage (GB) 不适用N/A 不适用N/A 不适用N/A 不适用N/A
最大并发工作线程数(请求数)Max concurrent workers (requests) 6060 9090 120120 200200
最大并发登录数Max concurrent logins 6060 9090 120120 200200
最大并发会话数Max concurrent sessions 600600 900900 12001200 24002400

标准服务层(续)Standard service tier (continued)

性能级别Performance level S4S4 S6S6 S7S7 S9S9 S12S12
最大 DTU 数Max DTUs 200200 400400 800800 16001600 30003000
包含的存储 (GB)Included storage (GB) 250250 250250 250250 250250 250250
最大存储选择 (GB)Max storage choices (GB) 250, 500, 750, 1024250, 500, 750, 1024 250, 500, 750, 1024250, 500, 750, 1024 250, 500, 750, 1024250, 500, 750, 1024 250, 500, 750, 1024250, 500, 750, 1024 250, 500, 750, 1024250, 500, 750, 1024
最大内存中 OLTP 存储 (GB)Max in-memory OLTP storage (GB) 不适用N/A 不适用N/A 不适用N/A 不适用N/A 不适用N/A
最大并发工作线程数(请求数)Max concurrent workers (requests) 400400 800800 16001600 32003200 60006000
最大并发登录数Max concurrent logins 400400 800800 16001600 32003200 60006000
最大并发会话数Max concurrent sessions 48004800 96009600 1920019200 3000030000 3000030000

高级服务层Premium service tier

性能级别Performance level P1P1 P2P2 P4P4 P6P6 P11P11 P15P15
最大 DTU 数Max DTUs 125125 250250 500500 10001000 17501750 40004000
包含的存储 (GB)Included storage (GB) 500500 500500 500500 500500 40964096 40964096
最大存储选择 (GB)Max storage choices (GB) 500, 750, 1024500, 750, 1024 500, 750, 1024500, 750, 1024 500, 750, 1024500, 750, 1024 500, 750, 1024500, 750, 1024 40964096 40964096
最大内存中 OLTP 存储 (GB)Max in-memory OLTP storage (GB) 11 #N/A2 44 88 1414 3232
最大并发工作线程数(请求数)Max concurrent workers (requests) 200200 400400 800800 16001600 24002400 64006400
最大并发登录数Max concurrent logins 200200 400400 800800 16001600 24002400 64006400
最大并发会话数Max concurrent sessions 3000030000 3000030000 3000030000 3000030000 3000030000 3000030000

高级 RS 服务层Premium RS service tier

性能级别Performance level PRS1PRS1 PRS2PRS2 PRS4PRS4 PRS6PRS6
最大 DTU 数Max DTUs 125125 250250 500500 10001000
包含的存储 (GB)Included storage (GB) 500500 500500 500500 500500
最大存储选择 (GB)Max storage choices (GB) 500, 750, 1024500, 750, 1024 500, 750, 1024500, 750, 1024 500, 750, 1024500, 750, 1024 500, 750, 1024500, 750, 1024
最大内存中 OLTP 存储 (GB)Max in-memory OLTP storage (GB) 11 #N/A2 44 88
最大并发工作线程数(请求数)Max concurrent workers (requests) 200200 400400 800800 16001600
最大并发登录数Max concurrent logins 200200 400400 800800 16001600
最大并发会话数Max concurrent sessions 3000030000 3000030000 3000030000 3000030000

重要

* 超出所包括存储量的存储大小为预览版,需额外付费。* Storage sizes greater than the amount of included storage are in preview and extra costs apply. 有关详细信息,请参阅 SQL 数据库定价For details, see SQL Database pricing.

* 在高级层中,以下区域目前提供的存储超出 1 TB:美国东部 2、美国西部、美国弗吉尼亚州政府、西欧、德国中部、东南亚、日本东部、澳大利亚东部、加拿大中部和加拿大东部。* In the Premium tier, more than 1 TB of storage 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. 请参阅 P11-P15 当前限制See P11-P15 Current Limitations.

** 标准池中每个数据库的最大 DTU 数至少为 200 DTU 的为预览版。** Max DTUs per database starting at 200 DTUs and higher in Standard are in preview.

单一数据库:更改存储大小Single database: change storage size

  • 单一数据库的 DTU 价格附送了一定容量的存储,无需额外费用。The DTU price for a single database includes a certain amount of storage at no additional cost. 超出附送的量后,可花费额外的费用预配额外的存储,但不能超过存储上限,不超过 1 TB 时,以 250 GB 为增量进行预配,超出 1 TB 时,以 256 GB 为增量进行预配。Extra storage beyond the included amount can be provisioned for an additional cost up to the max size limit in increments of 250 GB up to 1 TB, and then in increments of 256 GB beyond 1 TB. 有关附送存储量和大小上限,请参阅单一数据库:存储大小和性能级别For included storage amounts and max size limits, see Single database: Storage sizes and performance levels.
  • 可通过 Azure portalTransact-SQLPowerShellAzure CLIREST API 为单一数据库增加大小上限,以预配额外存储。Extra storage for a single database can be provisioned by increasing its max size using the Azure portal, Transact-SQL, PowerShell, the Azure CLI, or the REST API.
  • 单一数据库的额外存储价格等于额外存储量乘以服务层的额外存储单价。The price of extra storage for a single database is the extra storage amount multiplied by the extra storage unit price of the service tier. 有关额外存储价格的详细信息,请参阅 SQL 数据库定价For details on the price of extra storage, see SQL Database pricing.

单一数据库:更改 DTUSingle database: change DTUs

首先选择服务层、性能级别和存储量,然后使用 Azure portalTransact-SQLPowerShellAzure CLIREST API,根据实际体验动态扩展或缩减单一数据库。After initially picking a service tier, performance level, and storage amount, you can scale a single database up or down dynamically based on actual experience using the Azure portal, Transact-SQL, PowerShell, the Azure CLI, or the REST API.

下面视频演示了如何动态更改性能层以增加单一数据库的可用 DTU。The following video shows dynamically changing the performance tier to increase available DTUs for a single database.

更改数据库的服务层和/或性能级别将在新的性能级别创建原始数据库的副本,并将连接切换到副本。Changing the service tier and/or performance level of a database creates a replica of the original database at the new performance level, and then switches connections over to the replica. 当我们切换到副本时,在此过程中不会丢失任何数据,但在短暂的瞬间,将禁用与数据库的连接,因此可能回滚某些处于进行状态的事务。No data is lost during this process but during the brief moment when we switch over to the replica, connections to the database are disabled, so some transactions in flight may be rolled back. 用于切换的时间长度因情况而异,但通常为 4 秒以下,并且 99% 的情况下少于 30 秒。The length of time for the switch-over varies, but is generally under 4 seconds is less than 30 seconds 99% of the time. 如果在禁用连接的那一刻有大量的事务正在进行,则用于切换的时间长度可能会更长。If there are large numbers of transactions in flight at the moment connections are disabled, the length of time for the switch-over may be longer.

整个扩展过程的持续时间同时取决于更改前后数据库的大小和服务层。The duration of the entire scale-up process depends on both the size and service tier of the database before and after the change. 例如,一个正在更改到标准服务层、从标准服务层更改或在标准服务层内更改的 250 GB 的数据库应在六小时内完成。For example, a 250-GB database that is changing to, from, or within a Standard service tier, should complete within six hours. 如果数据库与正在高级服务层内更改性能级别的大小相同,应在三小时内完成扩展。For a database the same size that is changing performance levels within the Premium service tier, the scale-up should complete within three hours.

提示

若要检查正在进行的 SQL 数据库缩放操作的状态,可以使用以下查询:select * from sys.dm_operation_statusTo check on the status of an ongoing SQL database scaling operation, you can use the following query: select * from sys.dm_operation_status.

  • 如果要升级到更高的服务层或性能级别,除非显式指定了更大的大小(最大),否则,最大数据库大小不会增大。If you are upgrading to a higher service tier or performance level, the database max size does not increase unless you explicitly specify a larger size (maxsize).
  • 若要对数据库进行降级,数据库所用空间必须小于目标服务层和性能级别允许的最大大小。To downgrade a database, the database used space must be smaller than the maximum allowed size of the target service tier and performance level.
  • 从高级或高级 RS 降级至标准层时,如果同时满足 (1) 目标性能级别支持该数据库的最大大小,(2) 最大大小超出目标性能级别附送的存储量,那么将产生额外存储费用。When downgrading from Premium or Premium RS to the Standard tier, an extra storage cost applies if both (1) the max size of the database is supported in the target performance level, and (2) the max size exceeds the included storage amount of the target performance level. 例如,如果将最大大小为 500 GB 的 P1 数据库缩小至 S3,那么将产生额外的存储费用,因为 S3 支持的最大大小为 500 GB,而它的附送存储量仅为 250 GB。For example, if a P1 database with a max size of 500 GB is downsized to S3, then an extra storage cost applies since S3 supports a max size of 500 GB and its included storage amount is only 250 GB. 因此,额外存储量为 500 GB – 250 GB = 250 GB。So, the extra storage amount is 500 GB – 250 GB = 250 GB. 有关额外存储定价的信息,请参阅 SQL 数据库定价For pricing of extra storage, see SQL Database pricing. 如果实际使用的空间量小于附送的存储量,只要将数据库最大大小减少到附送的量,就能避免此项额外费用。If the actual amount of space used is less than the included storage amount, then this extra cost can be avoided by reducing the database max size to the included amount.
  • 在启用了异地复制的情况下升级数据库时,请先将辅助数据库升级到所需的性能层,然后再升级主数据库(一般原则)。When upgrading a database with geo-replication enabled, upgrade its secondary databases to the desired performance tier before upgrading the primary database (general guidance). 在升级到另一版本时,必须首先升级辅助数据库。When upgrading to a different, upgrading the secondary database first is required.
  • 在启用了异地复制的情况下降级数据库时,请先将主数据库降级到所需的性能层,然后再降级辅助数据库(一般原则)。When downgrading a database with geo-replication enabled, downgrade its primary databases to the desired performance tier before downgrading the secondary database (general guidance). 在降级到另一版本时,必须首先降级主数据库。When downgrading to a different edition, downgrading the primary database first is required.
  • 各服务层提供的还原服务各不相同。The restore service offerings are different for the various service tiers. 如果要降级到基本层,则备份保留期也将减少 - 请参阅 Azure SQL 数据库备份If you are downgrading to the Basic tier, there is a lower backup retention period - see Azure SQL Database Backups.
  • 所做的更改完成之前不会应用数据库的新属性。The new properties for the database are not applied until the changes are complete.

单一数据库:当最大大小超过 1 TB 时,P11 和 P15 的限制Single database: limitations of P11 and P15 when the maximum size greater than 1 TB

以下区域支持 P11 和 P15 数据库最大大小超过 1 TB:美国东部 2、美国西部、美国弗吉尼亚州政府、西欧、德国中部、东南亚、日本东部、澳大利亚东部、加拿大中部和加拿大东部。A maximum size greater than 1 TB for P11 and P15 database is supported 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. 对于最大大小超过 1 TB 的 P11 和 P15 数据库,存在以下注意事项和限制:The following considerations and limitations apply to P11 and P15 databases with a maximum size greater than 1 TB:

  • 如果在创建数据库时选择超过 1 TB 的最大大小(使用值 4 TB 或 4096 GB),如果在不受支持的区域中预配数据库,则 create 命令将会失败并出错。If you choose a maximum size greater than 1 TB when creating a database (using a value of 4 TB or 4096 GB), the create command fails with an error if the database is provisioned in an unsupported region.
  • 对于位于一个受支持区域中的 P11 和 P15 数据库,可以以 256 GB 为增量,将其最大存储增至 1 TB 以上,最高可达 4 TB。For existing P11 and P15 databases located in one of the supported regions, you can increase the maximum storage to beyond 1 TB in increments of 256 GB up to 4 TB. 要了解所在区域是否支持更大的大小,请使用 DATABASEPROPERTYEX 功能,或在 Azure 门户中查看数据库大小。To see if a larger size is supported in your region, use the DATABASEPROPERTYEX function or inspect the database size in the Azure portal. 升级现有 P11 或 P15 数据库只能由服务器级主体登录名或 dbmanager 数据库角色的成员执行。Upgrading an existing P11 or P15 database can only be performed by a server-level principal login or by members of the dbmanager database role.
  • 如果在受支持的区域中执行升级操作,则配置会立即更新。If an upgrade operation is executed in a supported region the configuration is updated immediately. 在升级过程中,数据库将保持联机。The database remains online during the upgrade process. 但是,在实际的数据库文件已升级到新的最大大小之前,无法利用超过 1 TB 的所有存储量。However, you cannot utilize the full amount of storage beyond 1 TB of storage until the actual database files have been upgraded to the new maximum size. 所需的时间长度取决于要升级的数据库的大小。The length of time required depends upon on the size of the database being upgraded.
  • 创建或更新 P11 或 P15 数据库时,只能在增量为 256 GB 的 1 TB 和 4 TB 最大大小之间选择。When creating or updating a P11 or P15 database, you can only choose between 1-TB and 4-TB maximum size in increments of 256 GB. 创建 P11/P15 数据库时,系统已预先选择了默认的 1TB 存储选项。When creating a P11/P15, the default storage option of 1 TB is pre-selected. 对于位于某个受支持区域中的数据库,可将新的或现有单一数据库的存储上限增加到 4 TB。For databases located in one of the supported regions, you can increase the storage maximum to up to a maximum of 4 TB for a new or existing single database. 对于所有其他区域,无法将最大大小增大到 1 TB 以上。For all other regions, the maximum size cannot be increased above 1 TB. 选择 4 TB 的随附存储时,价格不会更改。The price does not change when you select 4 TB of included storage.
  • 如果将数据库的最大大小设置为 1 TB 以上,则即使使用的实际存储不到 1 TB,也无法将其更改为 1 TB。If the maximum size of a database is set to greater than 1 TB, then it cannot be changed to 1 TB even if the actual storage used is below 1 TB. 因此,无法将最大大小超过 1 TB 的 P11 或 P15 降级为 1 TB P11、1 TB P15 或更低的性能层,例如 P1-P6)。Thus, you cannot downgrade a P11 or P15 with a maximum size larger than 1 TB to a 1 TB P11 or 1 TB P15 or lower performance tier, such as P1-P6). 此限制也适用于还原和复制方案,包括时间点、异地还原、长期备份保留以及数据库复制。This restriction also applies to the restore and copy scenarios including point-in-time, geo-restore, long-term-backup-retention, and database copy. 将数据库的最大大小配置为超过 1 TB 后,此数据库的所有还原操作都必须适合最大大小高于 1 TB 的 P11/P15。Once a database is configured with a maximum size greater than 1 TB, all restore operations of this database must be run into a P11/P15 with a maximum size greater than 1 TB.
  • 对于“活动异地复制”方案:For active geo-replication scenarios:
    • 设置异地复制关系:如果主数据库是 P11 或 P15,则辅助数据库也必须为 P11 或 P15,更低的性能层会被拒绝作为辅助数据库,因为它们不能支持超过 1 TB。Setting up a geo-replication relationship: If the primary database is P11 or P15, the secondary(ies) must also be P11 or P15; lower performance tiers are rejected as secondaries since they are not capable of supporting more than 1 TB.
    • 升级异地复制关系中的主数据库:在主数据库上将最大大小更改为超过 1 TB 将触发辅助数据库上的相同更改。Upgrading the primary database in a geo-replication relationship: Changing the maximum size to more than 1 TB on a primary database triggers the same change on the secondary database. 这两个升级都必须成功才能使主数据库上的更改生效。Both upgrades must be successful for the change on the primary to take effect. 超过 1 TB 选项的区域限制适用。Region limitations for the more than 1-TB option apply. 如果辅助数据库位于不支持超过 1 TB 的区域,则不会升级主数据库。If the secondary is in a region that does not support more than 1 TB, the primary is not upgraded.
  • 不支持将导入/导出服务用于加载超过 1 TB 的 P11/P15 数据库。Using the Import/Export service for loading P11/P15 databases with more than 1 TB is not supported. 使用 SqlPackage.exe 可导入导出数据。Use SqlPackage.exe to import and export data.

弹性池:存储大小和性能级别Elastic pool: storage sizes and performance levels

对于 SQL 数据库弹性池,下表显示了在每个服务层和性能级别可用的资源。For SQL Database elastic pools, the following tables show the resources available at each service tier and performance level. 可通过 Azure 门户PowerShellAzure CLIREST API 设置服务层、性能级别和存储量。You can set the service tier, performance level, and storage amount using the Azure portal, PowerShell, the Azure CLI, or the REST API.

备注

弹性池中各个数据库的资源限制通常与池外部基于 DTU 和服务层的各个数据库相同。The resource limits of individual databases in elastic pools are generally the same as for single databases outside of pools based on DTUs and the service tier. 例如,S2 数据库的最大并发辅助进程数为 120 个。For example, the max concurrent workers for an S2 database is 120 workers. 因此,如果池中每个数据库的最大 DTU 是 50 个 DTU(这等效于 S2),则标准池中数据库的最大并发辅助进程数也是 120 个辅助进程。So, the max concurrent workers for a database in a Standard pool is also 120 workers if the max DTU per database in the pool is 50 DTUs (which is equivalent to S2).

基本弹性池限制Basic elastic pool limits

每个池的 eDTU 数eDTUs per pool 5050 100100 200200 300300 400400 800800 12001200 16001600
每个池包含的存储 (GB)Included storage per pool (GB) 55 1010 2020 2929 3939 7878 117117 156156
每个池的最大存储选择 (GB)Max storage choices per pool (GB) 55 1010 2020 2929 3939 7878 117117 156156
每个池的最大内存中 OLTP 存储 (GB)Max In-Memory OLTP storage per pool (GB) 不适用N/A 不适用N/A 不适用N/A 不适用N/A 不适用N/A 不适用N/A 不适用N/A 不适用N/A
每个池的最大数据库数Max number DBs per pool 100100 200200 500500 500500 500500 500500 500500 500500
每个池的最大并发工作线程数(请求数)Max concurrent workers (requests) per pool 100100 200200 400400 600600 800800 16001600 24002400 32003200
每个池的最大并发登录数Max concurrent logins per pool 100100 200200 400400 600600 800800 16001600 24002400 32003200
每个池的最大并发会话数Max concurrent sessions per pool 3000030000 3000030000 3000030000 3000030000 3000030000 3000030000 3000030000 3000030000
每个数据库的最小 eDTU 数选择Min eDTUs choices per database 0, 50, 5 0, 50, 5 0, 50, 5 0, 50, 5 0, 50, 5 0, 50, 5 0, 50, 5 0, 50, 5
每个数据库的最大 eDTU 数选择Max eDTUs choices per database 55 55 55 55 55 55 55 55
每个数据库的最大存储空间 (GB)Max storage per database (GB) #N/A2 22 22 22 22 22 22 #N/A2

标准弹性池限制Standard elastic pool limits

每个池的 eDTU 数eDTUs per pool 5050 100100 200200 300300 400400 800800
每个池包含的存储 (GB)Included storage per pool (GB) 5050 100100 200200 300300 400400 800800
每个池的最大存储选择 (GB)Max storage choices per pool (GB) 50, 250, 50050, 250, 500 100, 250, 500, 750100, 250, 500, 750 200, 250, 500, 750, 1024200, 250, 500, 750, 1024 300, 500, 750, 1024, 1280300, 500, 750, 1024, 1280 400, 500, 750, 1024, 1280, 1536400, 500, 750, 1024, 1280, 1536 800, 1024, 1280, 1536, 1792, 2048800, 1024, 1280, 1536, 1792, 2048
每个池的最大内存中 OLTP 存储 (GB)Max In-Memory OLTP storage per pool (GB) 不适用N/A 不适用N/A 不适用N/A 不适用N/A 不适用N/A 不适用N/A
每个池的最大数据库数Max number DBs per pool 100100 200200 500500 500500 500500 500500
每个池的最大并发工作线程数(请求数)Max concurrent workers (requests) per pool 100100 200200 400400 600600 800800 16001600
每个池的最大并发登录数Max concurrent logins per pool 100100 200200 400400 600600 800800 16001600
每个池的最大并发会话数Max concurrent sessions per pool 3000030000 3000030000 3000030000 3000030000 3000030000 3000030000
每个数据库的最小 eDTU 数选择Min eDTUs choices per database 0, 10, 20, 500, 10, 20, 50 0, 10, 20, 50, 1000, 10, 20, 50, 100 0, 10, 20, 50, 100, 2000, 10, 20, 50, 100, 200 0, 10, 20, 50, 100, 200, 3000, 10, 20, 50, 100, 200, 300 0, 10, 20, 50, 100, 200, 300, 4000, 10, 20, 50, 100, 200, 300, 400 0, 10, 20, 50, 100, 200, 300, 400, 8000, 10, 20, 50, 100, 200, 300, 400, 800
每个数据库的最大 eDTU 数选择Max eDTUs choices per database 10, 20, 5010, 20, 50 10, 20, 50, 10010, 20, 50, 100 10, 20, 50, 100, 20010, 20, 50, 100, 200 10, 20, 50, 100, 200, 30010, 20, 50, 100, 200, 300 10, 20, 50, 100, 200, 300, 40010, 20, 50, 100, 200, 300, 400 10, 20, 50, 100, 200, 300, 400, 80010, 20, 50, 100, 200, 300, 400, 800
每个数据库的最大存储 (GB)Max storage per database (GB) 500500 750750 10241024 10241024 10241024 10241024

标准弹性池限制(续)Standard elastic pool limits (continued)

每个池的 eDTU 数eDTUs per pool 12001200 16001600 20002000 25002500 30003000
每个池包含的存储 (GB)Included storage per pool (GB) 12001200 16001600 20002000 25002500 30003000
每个池的最大存储选择 (GB)Max storage choices per pool (GB) 1200, 1280, 1536, 1792, 2048, 2304, 25601200, 1280, 1536, 1792, 2048, 2304, 2560 1600, 1792, 2048, 2304, 2560, 2816, 30721600, 1792, 2048, 2304, 2560, 2816, 3072 2000, 2048, 2304, 2560, 2816, 3072, 3328, 35842000, 2048, 2304, 2560, 2816, 3072, 3328, 3584 2500, 2560, 2816, 3072, 3328, 3584, 3840, 40962500, 2560, 2816, 3072, 3328, 3584, 3840, 4096 3000, 3072, 3328, 3584, 3840, 40963000, 3072, 3328, 3584, 3840, 4096
每个池的最大内存中 OLTP 存储 (GB)Max In-Memory OLTP storage per pool (GB) 不适用N/A 不适用N/A 不适用N/A 不适用N/A 不适用N/A
每个池的最大数据库数Max number DBs per pool 500500 500500 500500 500500 500500
每个池的最大并发工作线程数(请求数)Max concurrent workers (requests) per pool 24002400 32003200 40004000 50005000 60006000
每个池的最大并发登录数Max concurrent logins per pool 24002400 32003200 40004000 50005000 60006000
每个池的最大并发会话数Max concurrent sessions per pool 3000030000 3000030000 3000030000 3000030000 3000030000
每个数据库的最小 eDTU 数选择Min eDTUs choices per database 0, 10, 20, 50, 100, 200, 300, 400, 800, 12000, 10, 20, 50, 100, 200, 300, 400, 800, 1200 0, 10, 20, 50, 100, 200, 300, 400, 800, 1200, 16000, 10, 20, 50, 100, 200, 300, 400, 800, 1200, 1600 0, 10, 20, 50, 100, 200, 300, 400, 800, 1200, 1600, 20000, 10, 20, 50, 100, 200, 300, 400, 800, 1200, 1600, 2000 0, 10, 20, 50, 100, 200, 300, 400, 800, 1200, 1600, 2000, 25000, 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, 30000, 10, 20, 50, 100, 200, 300, 400, 800, 1200, 1600, 2000, 2500, 3000
每个数据库的最大 eDTU 数选择Max eDTUs choices per database 10, 20, 50, 100, 200, 300, 400, 800, 120010, 20, 50, 100, 200, 300, 400, 800, 1200 10, 20, 50, 100, 200, 300, 400, 800, 1200, 160010, 20, 50, 100, 200, 300, 400, 800, 1200, 1600 10, 20, 50, 100, 200, 300, 400, 800, 1200, 1600, 200010, 20, 50, 100, 200, 300, 400, 800, 1200, 1600, 2000 10, 20, 50, 100, 200, 300, 400, 800, 1200, 1600, 2000, 250010, 20, 50, 100, 200, 300, 400, 800, 1200, 1600, 2000, 2500 10, 20, 50, 100, 200, 300, 400, 800, 1200, 1600, 2000, 2500, 300010, 20, 50, 100, 200, 300, 400, 800, 1200, 1600, 2000, 2500, 3000
每个数据库的最大存储选择 (GB)Max storage choices per database (GB) 10241024 10241024 10241024 10241024 10241024

高级弹性池限制Premium elastic pool limits

每个池的 eDTU 数eDTUs per pool 125125 250250 500500 10001000 15001500
每个池包含的存储 (GB)Included storage per pool (GB) 250250 500500 750750 10241024 15361536
每个池的最大存储选择 (GB)Max storage choices per pool (GB) 250, 500, 750, 1024250, 500, 750, 1024 500, 750, 1024500, 750, 1024 750, 1024750, 1024 10241024 15361536
每个池的最大内存中 OLTP 存储 (GB)Max In-Memory OLTP storage per pool (GB) 11 #N/A2 44 1010 1212
每个池的最大数据库数Max number DBs per pool 5050 100100 100100 100100 100100
每个池的最大并发工作线程数(请求数)Max concurrent workers per pool (requests) 200200 400400 800800 16001600 24002400
每个池的最大并发登录数Max concurrent logins per pool 200200 400400 800800 16001600 24002400
每个池的最大并发会话数Max concurrent sessions per pool 3000030000 3000030000 3000030000 3000030000 3000030000
每个数据库的最小 eDTU 数Min eDTUs per database 0, 25, 50, 75, 1250, 25, 50, 75, 125 0, 25, 50, 75, 125, 2500, 25, 50, 75, 125, 250 0, 25, 50, 75, 125, 250, 5000, 25, 50, 75, 125, 250, 500 0, 25, 50, 75, 125, 250, 500, 10000, 25, 50, 75, 125, 250, 500, 1000 0, 25, 50, 75, 125, 250, 500, 1000, 15000, 25, 50, 75, 125, 250, 500, 1000, 1500
每个数据库的最大 eDTU 数Max eDTUs per database 25, 50, 75, 12525, 50, 75, 125 25, 50, 75, 125, 25025, 50, 75, 125, 250 25, 50, 75, 125, 250, 50025, 50, 75, 125, 250, 500 25, 50, 75, 125, 250, 500, 100025, 50, 75, 125, 250, 500, 1000 25, 50, 75, 125, 250, 500, 1000, 150025, 50, 75, 125, 250, 500, 1000, 1500
每个数据库的最大存储 (GB)Max storage per database (GB) 10241024 10241024 10241024 10241024 10241024

高级弹性池限制(续)Premium elastic pool limits (continued)

每个池的 eDTU 数eDTUs per pool 20002000 25002500 30003000 35003500 40004000
每个池包含的存储 (GB)Included storage per pool (GB) 20482048 25602560 30723072 35483548 40964096
每个池的最大存储选择 (GB)Max storage choices per pool (GB) 20482048 25602560 30723072 35483548 40964096
每个池的最大内存中 OLTP 存储 (GB)Max In-Memory OLTP storage per pool (GB) 1616 2020 2424 2828 3232
每个池的最大数据库数Max number DBs per pool 100100 100100 100100 100100 100100
每个池的最大并发工作线程数(请求数)Max concurrent workers (requests) per pool 32003200 40004000 48004800 56005600 64006400
每个池的最大并发登录数Max concurrent logins per pool 32003200 40004000 48004800 56005600 64006400
每个池的最大并发会话数Max concurrent sessions per pool 3000030000 3000030000 3000030000 3000030000 3000030000
每个数据库的最小 eDTU 数选择Min eDTUs choices per database 0, 25, 50, 75, 125, 250, 500, 1000, 17500, 25, 50, 75, 125, 250, 500, 1000, 1750 0, 25, 50, 75, 125, 250, 500, 1000, 17500, 25, 50, 75, 125, 250, 500, 1000, 1750 0, 25, 50, 75, 125, 250, 500, 1000, 17500, 25, 50, 75, 125, 250, 500, 1000, 1750 0, 25, 50, 75, 125, 250, 500, 1000, 17500, 25, 50, 75, 125, 250, 500, 1000, 1750 0, 25, 50, 75, 125, 250, 500, 1000, 1750, 40000, 25, 50, 75, 125, 250, 500, 1000, 1750, 4000
每个数据库的最大 eDTU 数选择Max eDTUs choices per database 25, 50, 75, 125, 250, 500, 1000, 175025, 50, 75, 125, 250, 500, 1000, 1750 25, 50, 75, 125, 250, 500, 1000, 175025, 50, 75, 125, 250, 500, 1000, 1750 25, 50, 75, 125, 250, 500, 1000, 175025, 50, 75, 125, 250, 500, 1000, 1750 25, 50, 75, 125, 250, 500, 1000, 175025, 50, 75, 125, 250, 500, 1000, 1750 25, 50, 75, 125, 250, 500, 1000, 1750, 400025, 50, 75, 125, 250, 500, 1000, 1750, 4000
每个数据库的最大存储 (GB)Max storage per database (GB) 10241024 10241024 10241024 10241024 10241024

高级 RS 弹性池限制Premium RS elastic pool limits

每个池的 eDTU 数eDTUs per pool 125125 250250 500500 10001000
每个池包含的存储 (GB)Included storage per pool (GB) 250250 500500 750750 750750
每个池的最大存储选择 (GB)Max storage choices per pool (GB) 250, 500, 750, 1024250, 500, 750, 1024 500, 750, 1024500, 750, 1024 750, 1024750, 1024 10241024
每个池的最大内存中 OLTP 存储 (GB)Max In-Memory OLTP storage per pool (GB) 11 #N/A2 44 1010
每个池的最大数据库数Max number DBs per pool 5050 100100 100100 100100
每个池的最大并发工作线程数(请求数)Max concurrent workers (requests) per pool 200200 400400 800800 16001600
每个池的最大并发登录数Max concurrent logins per pool 200200 400400 800800 16001600
每个池的最大并发会话数Max concurrent sessions per pool 3000030000 3000030000 3000030000 3000030000
每个数据库的最小 eDTU 数选择Min eDTUs choices per database 0, 25, 50, 75, 1250, 25, 50, 75, 125 0, 25, 50, 75, 125, 2500, 25, 50, 75, 125, 250 0, 25, 50, 75, 125, 250, 5000, 25, 50, 75, 125, 250, 500 0, 25, 50, 75, 125, 250, 500, 10000, 25, 50, 75, 125, 250, 500, 1000
每个数据库的最大 eDTU 数选择Max eDTUs choices per database 25, 50, 75, 12525, 50, 75, 125 25, 50, 75, 125, 25025, 50, 75, 125, 250 25, 50, 75, 125, 250, 50025, 50, 75, 125, 250, 500 25, 50, 75, 125, 250, 500, 100025, 50, 75, 125, 250, 500, 1000
每个数据库的最大存储 (GB)Max storage per database (GB) 10241024 10241024 10241024 10241024

重要

* 超出所包括存储量的存储大小为预览版,需额外付费。* Storage sizes greater than the amount of included storage are in preview and extra costs apply. 有关详细信息,请参阅 SQL 数据库定价页For details, see the SQL Database pricing page. 超出所包括存储量的存储大小为预览版,需额外付费。Storage sizes greater than the amount of included storage are in preview and extra costs apply. 有关详细信息,请参阅 SQL 数据库定价页For details, see the SQL Database pricing page.

* 在高级层中,以下区域目前提供的存储超出 1 TB:美国东部 2、美国西部、美国弗吉尼亚州政府、西欧、德国中部、东南亚、日本东部、澳大利亚东部、加拿大中部和加拿大东部。* In the Premium tier, more than 1 TB of storage 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.

** 标准池中每个数据库的最小/最大 eDTU 数至少为 200 eDTU 的为预览版。** Min/max eDTUs per database starting at 200 eDTUs and higher in Standard pools are in preview.

如果使用了弹性池的所有 DTU,那么池中的每个数据库将接收相同数量的资源来处理查询。If all DTUs of an elastic pool are used, then each database in the pool receives an equal amount of resources to process queries. SQL 数据库服务通过确保相等的计算时间片,在数据库之间提供资源共享的公平性。The SQL Database service provides resource sharing fairness between databases by ensuring equal slices of compute time. 弹性池资源共享公平性是在将每个数据库的 DTU 最小值设为非零值时,对另外为每个数据库保证的任意资源量的补充。Elastic pool resource sharing fairness is in addition to any amount of resource otherwise guaranteed to each database when the DTU min per database is set to a non-zero value.

入池数据库的数据库属性Database properties for pooled databases

下表介绍了入池数据库的属性。The following table describes the properties for pooled databases.

属性Property 说明Description
每个数据库的最大 eDTU 数Max eDTUs per database 根据池中其他数据库的 eDTU 使用率,池中任何数据库可以使用的 eDTU 的最大数目。The maximum number of eDTUs that any database in the pool may use, if available based on utilization by other databases in the pool. 每个数据库的 eDTU 上限并不是数据库的资源保障。Max eDTU per database is not a resource guarantee for a database. 此设置是应用于池中所有数据库的全局设置。This setting is a global setting that applies to all databases in the pool. 将每个数据库的最大 eDTU 数设置得足够高,以处理数据库使用高峰情况。Set max eDTUs per database high enough to handle peaks in database utilization. 因为池通常会假定数据库存在热使用模式和冷使用模式,在这些模式中并非所有数据库同时处于高峰使用状态,所以预期会存在某种程度的过量使用情况。Some degree of overcommitting is expected since the pool generally assumes hot and cold usage patterns for databases where all databases are not simultaneously peaking. 例如,假设每个数据库的高峰使用量为 20 个 eDTU,并且池中 100 个数据库仅有 20% 同时处于高峰使用中。For example, suppose the peak utilization per database is 20 eDTUs and only 20% of the 100 databases in the pool are peak at the same time. 如果将每个数据库的 eDTU 最大值设为 20 个 eDTU,则可以认为超量 5 倍使用该池是合理的,并且将每个池的 eDTU 数设为 400。If the eDTU max per database is set to 20 eDTUs, then it is reasonable to overcommit the pool by 5 times, and set the eDTUs per pool to 400.
每个数据库的最小 eDTU 数Min eDTUs per database 池中任何数据库可以保证的 eDTU 最小数目。The minimum number of eDTUs that any database in the pool is guaranteed. 此设置是应用于池中所有数据库的全局设置。This setting is a global setting that applies to all databases in the pool. 每个数据库的最小 eDTU 可能设为 0,这也是默认值。The min eDTU per database may be set to 0, and is also the default value. 该属性值可以设置为介于 0 和每个数据库的平均 eDTU 使用量之间的任意值。This property is set to anywhere between 0 and the average eDTU utilization per database. 池中数据库数目和每个数据库的 eDTU 下限的积不能超过每个池的 eDTU 数。The product of the number of databases in the pool and the min eDTUs per database cannot exceed the eDTUs per pool. 例如,如果一个池有 20 个数据库,每个数据库的 eDTU 最小值设为 10 个 eDTU,则池的 eDTU 数目必须大于或等于 200 个 eDTU。For example, if a pool has 20 databases and the eDTU min per database set to 10 eDTUs, then the eDTUs per pool must be at least as large as 200 eDTUs.
每个数据库的最大存储Max storage per database 池中一个数据库的最大存储。The maximum storage for a database in a pool. 入池数据库共享池的存储,因此数据库存储限制为池的剩余存储与每个数据库的最大存储之中的较小者。Pooled databases share pool storage, so database storage is limited to the smaller of remaining pool storage and max storage per database. 每个数据库的最大存储是指数据文件的最大存储,不包括日志文件使用的空间。Max storage per database refers to the maximum size of the data files and does not include the space used by log files.

弹性池:更改存储大小Elastic pool: change storage size

  • 弹性池的 eDTU 价格附送了一定容量的存储,无需额外费用。The eDTU price for an elastic pool includes a certain amount of storage at no additional cost. 超出附送的量后,可花费额外的费用预配额外的存储,但不能超过存储上限,不超过 1 TB 时,以 250 GB 为增量进行预配,超出 1 TB 时,以 256 GB 为增量进行预配。Extra storage beyond the included amount can be provisioned for an additional cost up to the max size limit in increments of 250 GB up to 1 TB, and then in increments of 256 GB beyond 1 TB. 有关附送存储量和大小上限,请参阅弹性池:存储大小和性能级别For included storage amounts and max size limits, see Elastic pool: storage sizes and performance levels.
  • 可通过 Azure 门户PowerShellAzure CLIREST API 为弹性池增加大小上限,以预配额外存储。Extra storage for an elastic pool can be provisioned by increasing its max size using the Azure portal, PowerShell, the Azure CLI, or the REST API.
  • 弹性池的额外存储价格等于额外存储量乘以服务层的额外存储单价。The price of extra storage for an elastic pool is the extra storage amount multiplied by the extra storage unit price of the service tier. 有关额外存储价格的详细信息,请参阅 SQL 数据库定价For details on the price of extra storage, see SQL Database pricing.

弹性池:更改 eDTUElastic pool: change eDTUs

可按资源需求,通过 Azure portalPowerShellAzure CLIREST API 增加或减少弹性池可用的资源。You can increase or decrease the resources available to an elastic pool based on resource needs using the Azure portal, PowerShell, the Azure CLI, or the REST API.

  • 重新缩放池 eDTU 时,将暂时停止数据库连接。When rescaling pool eDTUs, database connections are briefly dropped. 此行为与重新缩放单一数据库(而非在池中)的 DTU 时的行为相同。This is the same behavior as occurs when rescaling DTUs for a single database (not in a pool). 有关在重新缩放操作执行期间,停止数据库连接的持续时间和影响的详细信息,请参阅重新缩放单一数据库的 DTUFor details on the duration and impact of dropped connections for a database during rescaling operations, see Rescaling DTUs for a single database.
  • 重新缩放池 eDTU 的持续时间取决于池中所有数据库使用的总存储空间量。The duration to rescale pool eDTUs can depend on the total amount of storage space used by all databases in the pool. 一般而言,每 100 GB 重新缩放的平均延迟时间不超过 90 分钟。In general, the rescaling latency averages 90 minutes or less per 100 GB. 例如,如果池中所有数据库使用的总空间为 200 GB,则重新缩放池的预计延迟时间将不超过 3 小时。For example, if the total space used by all databases in the pool is 200 GB, then the expected latency for rescaling the pool is 3 hours or less. 对标准层或基本层中的某些事例而言,重新缩放延迟时间可能不超过五分钟,不考虑所用空间量的影响。In some cases within the Standard or Basic tier, the rescaling latency can be under five minutes regardless of the amount of space used.
  • 一般而言,更改每个数据库的最小 eDTU 或最大 eDTU 的持续时间将不超过五分钟。In general, the duration to change the min eDTUs per database or max eDTUs per database is five minutes or less.
  • 当缩小池 eDTU 时,池所用空间必须小于目标服务层和池 eDTU 所允许的最大大小。When downsizing pool eDTUs, the pool used space must be smaller than the maximum allowed size of the target service tier and pool eDTUs.
  • 当重新缩放池 eDTU 时,如果 (1) 目标池支持池的存储上限,(2) 存储上限超过了目标池附送的存储量,将产生额外存储费用。When rescaling pool eDTUs, an extra storage cost applies if (1) the storage max size of the pool is supported by the target pool, and (2) the storage max size exceeds the included storage amount of the target pool. 例如,如果最大大小为 100 GB 的 100 eDTU 标准池缩小为 50 eDTU 标准池,那么将产生额外存储费用,因为目标池支持的最大大小为 100 GB,其附送的存储量仅为 50 GB。For example, if a 100 eDTU Standard pool with a max size of 100 GB is downsized to a 50 eDTU Standard pool, then an extra storage cost applies since target pool supports a max size of 100 GB and its included storage amount is only 50 GB. 因此,额外存储量为 100 GB – 50 GB = 50 GB。So, the extra storage amount is 100 GB – 50 GB = 50 GB. 有关额外存储定价的信息,请参阅 SQL 数据库定价For pricing of extra storage, see SQL Database pricing. 如果实际使用的空间量小于附送的存储量,只要将数据库最大大小减少到附送的量,就能避免此项额外费用。If the actual amount of space used is less than the included storage amount, then this extra cost can be avoided by reducing the database max size to the included amount.

当数据库和弹性池资源到达限制时会如何?What happens when database and elastic pool resource limits are reached?

计算(DTU 和 eDTU)Compute (DTUs and eDTUs)

当数据库计算使用率(由 DTU 和 eDTU 计量)变高时,查询的延长时间也会增加,甚至可能出现超时。在上述情况下,服务可能对查询排队,并在资源可用时向查询提供资源以用于执行。When database compute utilization (measured by DTUs and eDTUs) becomes high, query latency increases and can even time out. Under these conditions, queries may be queued by the service and are provided resources for execution as resource become free. 计算使用率变高时,风险缓解选项包括:When encountering high compute utilization, mitigation options include:

存储Storage

当使用的数据库空间到达上限时,将无法进行增加数据大小的数据库插入和更新操作,客户端会收到错误消息When database space used reaches the max size limit, database inserts and updates that increase the data size fail and clients receive an error message. 数据库的选择和删除操作不受影响。Database SELECTS and DELETES continue to succeed.

空间使用率变高时,风险缓解选项包括:When encountering high space utilization, mitigation options include:

  • 增加数据库或弹性池的大小上限或更改性能级别,以包含更多已添加的存储。Increasing the max size of the database or elastic pool, or change the performance level to obtain more included storage. 请参阅 SQL 数据库资源限制See SQL Database Resource Limits.
  • 如果数据库在弹性池内,那么可选择将数据库移出弹性池,从而避免与其他数据库共享存储空间。If the database is in an elastic pool, then alternatively the database can be moved outside of the pool so that its storage space is not shared with other databases.

会话和辅助角色(请求)Sessions and workers (requests)

并发会话和辅助角色的数目上限由服务层和性能级别(DTU 和 eDTU)决定。The maximum number of concurrent sessions and workers are determined by the service tier and performance level (DTUs and eDTUs). 当到达会话或辅助角色上限时,新的请求将被拒绝,客户端将收到错误消息。New requests are rejected when session or worker limits are reached, and clients receive an error message. 虽然应用程序可以轻松地控制可用的连接数,但并行辅助角色数通常更难以估计和控制。While the number of connections available can be controlled by the application, the number of concurrent workers is often harder to estimate and control. 在负荷高峰期,当数据库资源达到上限,辅助角色由于较长时间运行查询而堆积时,这种情况尤其突出。This is especially true during peak load periods when database resource limits are reached and workers pile up due to longer running queries.

会话或辅助角色使用率变高时,风险缓解选项包括:When encountering high session or worker utilization, mitigation options include:

后续步骤Next steps