Azure SQL 数据库和 Azure SQL 托管实例服务层级Azure SQL Database and Azure SQL Managed Instance service tiers

适用于:是 Azure SQL 数据库 是Azure SQL 托管实例 APPLIES TO: yesAzure SQL Database yesAzure SQL Managed Instance

Azure SQL 数据库和 Azure SQL 托管实例基于 SQL Server 数据库引擎体系结构,该体系结构已根据云环境进行了调整,以确保即使在发生基础结构故障时,也仍能提供 99.99% 的可用性。Azure SQL Database and Azure SQL Managed Instance are based on SQL Server database engine architecture that's adjusted for the cloud environment to ensure 99.99 percent availability, even if there is an infrastructure failure. Azure SQL 数据库和 Azure SQL 托管实例中使用了两个服务层级,每个服务层级具有不同的体系结构模型。Two service tiers are used by Azure SQL Database and Azure SQL Managed Instance, each with a different architectural model. 这些服务层级为:These service tiers are:

  • 常规用途,设计用于预算导向型工作负荷。General purpose, which is designed for budget-oriented workloads.
  • 业务关键,设计用于低延迟工作负载,对故障具有高复原能力并可进行快速故障转移。Business critical, which is designed for low-latency workloads with high resiliency to failures and fast failovers.

Azure SQL 数据库还有一个服务层级:Azure SQL Database has an additional service tier:

  • 超大规模,设计用于大多数业务工作负荷,可提供高度可扩展的存储,读取扩展和快速数据库还原功能。Hyperscale, which is designed for most business workloads, providing highly scalable storage, read scale-out, and fast database restore capabilities.

本文讨论了基于 vCore 的购买模型中服务层级之间的差异、常规用途和业务关键型服务层级的存储和备份注意事项。This article discusses differences between the service tiers, storage and backup considerations for the general purpose and business critical service tiers in the vCore-based purchasing model.

服务层级比较Service tier comparison

下表介绍了最新一代(第 5 代)服务层级之间的主要差异。The following table describes the key differences between service tiers for the latest generation (Gen5). 请注意,SQL 数据库和 SQL 托管实例中的服务层级特征可能有所不同。Note that service tier characteristics might be different in SQL Database and SQL Managed Instance.

资源类型Resource type 常规用途General Purpose 超大规模Hyperscale 业务关键Business Critical
最适用于Best for 提供以预算导向的、均衡的计算和存储选项。Offers budget oriented balanced compute and storage options. 大多数业务工作负荷。Most business workloads. 自动缩放存储大小,最大可达 100 TB,流畅的垂直和水平计算缩放,快速数据库还原。Auto-scaling storage size up to 100 TB, fluid vertical and horizontal compute scaling, fast database restore. 事务率较高、IO 延迟较低的 OLTP 应用程序。OLTP applications with high transaction rate and low IO latency. 使用多个同步更新的副本提供最高故障复原能力和快速故障转移。Offers highest resilience to failures and fast failovers using multiple synchronously updated replicas.
在以下资源类型中可用:Available in resource type: SQL 数据库/ SQL 托管实例SQL Database / SQL Managed Instance 单一 Azure SQL 数据库Single Azure SQL Database SQL 数据库/ SQL 托管实例SQL Database / SQL Managed Instance
计算大小Compute size SQL 数据库SQL Database 1 - 80 个 vCore1 to 80 vCores 1 - 80 个 vCore1 to 80 vCores 1 - 80 个 vCore1 to 80 vCores
SQL 托管实例SQL Managed Instance 4、8、16、24、32、40、64、80 个 vCore4, 8, 16, 24, 32, 40, 64, 80 vCores 空值N/A 4、8、16、24 个 Vcore4, 8, 16, 24 vCores
存储类型Storage type 全部All 高级远程存储(每个实例)Premium remote storage (per instance) 具有本地 SSD 缓存的分离的存储(每个实例)De-coupled storage with local SSD cache (per instance) 超快的本地 SSD 存储(每个实例)Super-fast local SSD storage (per instance)
数据库大小Database size SQL 数据库SQL Database 5 GB - 4 TB5 GB - 4 TB 最多 100 TBUp to 100 TB 5 GB - 4 TB5 GB - 4 TB
SQL 托管实例SQL Managed Instance 32 GB - 8 TB32 GB - 8 TB 空值N/A 32 GB - 2 TB32 GB - 2 TB
存储大小Storage size SQL 数据库SQL Database 5 GB - 4 TB5 GB - 4 TB 最多 100 TBUp to 100 TB 5 GB - 4 TB5 GB - 4 TB
SQL 托管实例SQL Managed Instance 32 GB - 8 TB32 GB - 8 TB 空值N/A 32 GB - 2 TB32 GB - 2 TB
TempDB 大小TempDB size SQL 数据库SQL Database 每个 vCore 32 GB32 GB per vCore 每个 vCore 32 GB32 GB per vCore 每个 vCore 32 GB32 GB per vCore
SQL 托管实例SQL Managed Instance 每个 vCore 24 GB24 GB per vCore 空值N/A 最大 2 TB - 受存储大小限制Up to 2 TB - limited by storage size
日志写入吞吐量Log write throughput SQL 数据库SQL Database 每个 vCore 1.875 MB/秒(最大 30 MB/秒)1.875 MB/s per vCore (max 30 MB/s) 100 MB/秒100 MB/s 每个 vCore 6 MB/秒(最大 96 MB/秒)6 MB/s per vCore (max 96 MB/s)
SQL 托管实例SQL Managed Instance 每个 vCore 3 MB/秒(最大 22 MB/秒)3 MB/s per vCore (max 22 MB/s) 空值N/A 每个 vCore 4 MB/秒(最大 48 MB/秒)4 MB/s per vcore (max 48 MB/s)
可用性Availability 全部All 99.99%99.99% 99.95%(具有一个次要副本),99.99%(具有更多副本)99.95% with one secondary replica, 99.99% with more replicas 99.99%99.99%
备份Backups 全部All RA-GRS,7-35 天(默认为 7 天)RA-GRS, 7-35 days (7 days by default) RA-GRS,7 天,恒定的时间时点恢复 (PITR)RA-GRS, 7 days, constant time point-in-time recovery (PITR) RA-GRS,7-35 天(默认为 7 天)RA-GRS, 7-35 days (7 days by default)
内存中 OLTPIn-memory OLTP 空值N/A 空值N/A 可用Available
只读副本Read-only replicas 0 内置0 built-in
0 - 4 使用异地复制0 - 4 using geo-replication
0 - 4 内置0 - 4 built-in 1 内置,包含在价格中1 built-in, included in price
0 - 4 使用异地复制0 - 4 using geo-replication
定价/计费Pricing/billing SQL 数据库SQL Database vCore、保留存储和备份存储收费。vCore, reserved storage, and backup storage are charged.
IOPS 不收取费用。IOPS is not charged.
每个副本的 vCore 和已用存储收费。vCore for each replica and used storage are charged.
尚未收费的 IOPS。IOPS not yet charged.
vCore、保留存储和备份存储收费。vCore, reserved storage, and backup storage are charged.
IOPS 不收取费用。IOPS is not charged.
SQL 托管实例SQL Managed Instance vCore、保留存储和备份存储收费。vCore, reserved storage, and backup storage is charged.
IOPS 不收取费用IOPS is not charged
空值N/A vCore、保留存储和备份存储收费。vCore, reserved storage, and backup storage is charged.
IOPS 不收取费用。IOPS is not charged.
折扣模型Discount models Azure 混合权益(在开发/测试订阅中不可用)Azure Hybrid Benefit (not available on dev/test subscriptions)
提前支付开发/测试订阅Pay-In-Advance Dev/Test subscriptions
Azure 混合权益(在开发/测试订阅中不可用)Azure Hybrid Benefit (not available on dev/test subscriptions)
提前支付开发/测试订阅Pay-In-Advance Dev/Test subscriptions
Azure 混合权益(在开发/测试订阅中不可用)Azure Hybrid Benefit (not available on dev/test subscriptions)
提前支付开发/测试订阅Pay-In-Advance Dev/Test subscriptions

有关详细信息,请参阅 Azure SQL 数据库 (vCore)单一 Azure SQL 数据库 (DTU)共用 Azure SQL 数据库 (DTU)Azure SQL 托管实例页,了解服务层级之间的详细差异。For more information, see the detailed differences between the service tiers in Azure SQL Database (vCore), single Azure SQL Database (DTU), pooled Azure SQL Database (DTU), and Azure SQL Managed Instance pages.

备注

若要了解基于 vCore 的购买模型中的“超大规模”服务层级,请参阅“超大规模”服务层级For information about the hyperscale service tier in the vCore-based purchasing model, see hyperscale service tier. 有关基于 vCore 的购买模型与基于 DTU 的购买模型的比较,请参阅购买模型和资源For a comparison of the vCore-based purchasing model with the DTU-based purchasing model, see purchasing models and resources.

数据和日志存储Data and log storage

以下因素会影响用于数据和日志文件的存储量,这些影响适用于“常规用途”和“业务关键”服务层级。The following factors affect the amount of storage used for data and log files, and apply to General Purpose and Business Critical. 有关“超大规模”服务层级中的数据和日志存储的详细信息,请参阅“超大规模”服务层级For details on data and log storage in Hyperscale, see Hyperscale service tier.

  • 分配的存储由数据文件 (MDF) 和日志文件 (LDF) 使用。The allocated storage is used by data files (MDF) and log files (LDF).
  • 每个单一数据库计算大小支持一个最大数据库大小,默认最大大小为 32 GB。Each single database compute size supports a maximum database size, with a default maximum size of 32 GB.
  • 配置所需的单一数据库大小(MDF 文件大小)时,系统会自动额外添加 30% 的存储来支持 LDF 文件。When you configure the required single database size (the size of the MDF file), 30 percent more additional storage is automatically added to support LDF files.
  • 可以选择介于 10 GB 与受支持最大值之间的任何单一数据库大小。You can select any single database size between 10 GB and the supported maximum.
    • 对于“标准”或“常规用途”服务层级中的存储,按 10 GB 增量增减大小。For storage in the standard or general purpose service tiers, increase or decrease the size in 10-GB increments.
    • 对于“高级”或“业务关键”服务层级中的存储,按 250 GB 增量增减大小。For storage in the premium or business critical service tiers, increase or decrease the size in 250-GB increments.
  • 在“常规用途”服务层级中,tempdb 使用附加的 SSD,此存储成本包含在 vCore 价格中。In the general purpose service tier, tempdb uses an attached SSD, and this storage cost is included in the vCore price.
  • 在“业务关键”服务层级中,tempdb 与 MDF 和 LDF 文件共享附加的 SSD,tempdb 存储成本已包含在 vCore 价格中。In the business critical service tier, tempdb shares the attached SSD with the MDF and LDF files, and the tempdb storage cost is included in the vCore price.
  • SQL 托管实例的存储大小必须指定为 32 GB 的倍数。The storage size for a SQL Managed Instance must be specified in multiples of 32 GB.

重要

需要支付分配给 MDF 和 LDF 文件的总存储费用。You are charged for the total storage allocated for MDF and LDF files.

若要监视 MDF 和 LDF 文件的当前总大小,请使用 sp_spaceusedTo monitor the current total size of your MDF and LDF files, use sp_spaceused. 若要监视单个 MDF 和 LDF 文件的当前大小,请使用 sys.database_filesTo monitor the current size of the individual MDF and LDF files, use sys.database_files.

重要

在某些情况下,可能需要收缩数据库来回收未使用的空间。Under some circumstances, you may need to shrink a database to reclaim unused space. 有关详细信息,请参阅管理 Azure SQL 数据库中的文件空间For more information, see Manage file space in Azure SQL Database.

备份和存储Backups and storage

为数据库备份分配存储,以支持 SQL 数据库和 SQL 托管实例的时间点还原 (PITR) 和长期保留 (LTR) 功能。Storage for database backups is allocated to support the point-in-time restore (PITR) and long-term retention (LTR) capabilities of SQL Database and SQL Managed Instance. 此存储空间针对每个数据库单独分配,并根据数据库费用分开计费。This storage is allocated separately for each database and billed as two separate per-database charges.

  • PITR:自动将各个数据库备份复制到读取访问权限异地冗余存储 (RA-GRS)PITR: Individual database backups are copied to read-access geo-redundant (RA-GRS) storage automatically. 创建新备份时,存储大小动态递增。The storage size increases dynamically as new backups are created. 存储由每周完整备份、每日差异备份和 5 分钟复制一次的事务日志备份使用。The storage is used by weekly full backups, daily differential backups, and transaction log backups, which are copied every 5 minutes. 存储消耗量取决于数据库变化率和备份保留期。The storage consumption depends on the rate of change of the database and the retention period for backups. 可单独为每个数据库配置 7 到 35 天的保留期。You can configure a separate retention period for each database between 7 and 35 days. 提供与 100%(1 倍)数据库大小相等的最小存储量,不收取额外费用。A minimum storage amount equal to 100 percent (1x) of the database size is provided at no extra charge. 对于大多数数据库而言,此容量足以将备份存储 7 天。For most databases, this amount is enough to store 7 days of backups.
  • LTR:还可以选择将完整备份的长期保留时长配置为最长 10 年(此功能现通过 SQL 托管实例的有限公共预览版提供。LTR: You also have the option to configure long-term retention of full backups for up to 10 years (this feature is in limited public preview for SQL Managed Instance. 如果设置了 LTR 策略,则这些备份将自动存储在 RA-GRS 存储中,但你可以控制备份的复制频率。If you set up an LTR policy, these backups are stored in RA-GRS storage automatically, but you can control how often the backups are copied. 为了满足不同的符合性要求,可为每周、每月和/或每年备份选择不同的保留期。To meet different compliance requirements, you can select different retention periods for weekly, monthly, and/or yearly backups. 所选配置决定了多少存储将用于 LTR 备份。The configuration you choose determines how much storage will be used for LTR backups. 若要估算 LTR 存储成本,可以使用 LTR 定价计算器。To estimate the cost of LTR storage, you can use the LTR pricing calculator. 有关详细信息,请参阅 SQL 数据库长期保留For more information, see SQL Database long-term retention.

后续步骤Next steps

若要详细了解“常规用途”和“业务关键”服务层级中提供的特定计算大小和存储大小,请参阅:For details about the specific compute and storage sizes available in the general purpose and business critical service tiers, see: