SQL Server Azure VM 的定价指南Pricing guidance for SQL Server Azure VMs

本文提供 Azure 中 SQL Server 虚拟机的定价指南。This article provides pricing guidance for SQL Server virtual machines in Azure. 有几个选项会影响成本,请务必选取适当的映像来平衡成本与业务需求。There are several options that affect cost, and it is important to pick the right image that balances costs with business requirements.


如果只需了解特定 SQL Server 版本和虚拟机大小组合的估算成本,请参阅适用于 WindowsLinux 的定价页。If you only need to find out a cost estimate for a specific combination of SQL Server edition and virtual machine size, see the pricing page for Windows or Linux. 从“OS/软件”列表中选择平台 。Select your platform from the OS/Software list.

VM 定价页上的 UI

或使用定价计算器添加并配置虚拟机。Or use the pricing calculator to add and configure a virtual machine.

SQL Server 免费授权版Free-licensed SQL Server editions

若要开发、测试或生成概念证明,请使用免费授权的“SQL Server Developer Edition” 。If you want to develop, test, or build a proof of concept, then use the freely licensed SQL Server Developer edition. 此版本提供所有 SQL Server Enterprise Edition 功能,通过它可以生成和测试任意类型的应用程序。This edition has all the features of SQL Server Enterprise edition, allowing you to build and test any type of application. 但是,不能在生产环境中运行 Developer Edition。However, you cannot run the Developer edition in production. SQL Server Developer Edition VM只产生 VM 成本费用,因为没有任何相关的 SQL Server 许可成本。A SQL Server Developer edition VM only incurs charges for the cost of the VM, because there are no associated SQL Server licensing costs.

若要在生产环境中运行轻型工作负荷(小于 4 核、小于 1 GB 内存、小于 10 GB/数据库),请使用免费授权的“SQL Server Express Edition” 。If you want to run a lightweight workload in production (<4 cores, <1-GB memory, <10 GB/database), use the freely licensed SQL Server Express edition. SQL Server Express Edition VM 同样只产生 VM 成本费用。A SQL Server Express edition VM also only incurs charges for the cost of the VM.

对于这些开发/测试和轻型生产工作负荷,还可通过选择与这些工作负荷相匹配的较小的 VM 大小来节省资金。For these development/test and lightweight production workloads, you can also save money by choosing a smaller VM size that matches these workloads. 在某些情况下 DS1v2 可能是不错的选择。The DS1v2 might be a good choice in some scenarios.

若要使用上述某个映像创建 SQL Server 2017 Azure VM,请参阅以下链接:To create a SQL Server 2017 Azure VM with one of these images, see the following links:

平台Platform 自由许可的映像Freely licensed images
Windows Server 2016Windows Server 2016 SQL Server 2017 Developer Azure VMSQL Server 2017 Developer Azure VM
SQL Server 2017 Express Azure VMSQL Server 2017 Express Azure VM
UbuntuUbuntu SQL Server 2017 Developer Azure VMSQL Server 2017 Developer Azure VM
SQL Server 2017 Express Azure VMSQL Server 2017 Express Azure VM

若拥有非轻型生产工作负荷,请使用以下 SQL Server 版本之一:If you have a non-lightweight production workload, use one of the following SQL Server editions:

SQL Server 版本SQL Server Edition 工作负载Workload
WebWeb 小型网站Small web sites
StandardStandard 中小型工作负荷Small to medium workloads
EnterpriseEnterprise 大型或任务关键型工作负荷Large or mission-critical workloads

可按两种方法为这些版本的 SQL Server 许可付费:标准预付费套餐 或自带许可证 (BYOL) 。You have two options to pay for SQL Server licensing for these editions: Standard Pay-In-Advance Offer or bring your own license (BYOL).

标准预付费套餐Standard Pay-In-Advance Offer

标准预付费套餐意味着 Azure VM 的每秒运行成本包括 SQL Server 许可证的费用。Standard Pay-In-Advance Offer means that the per-second cost of running the Azure VM includes the cost of the SQL Server license. 有关不同 SQL Server 版本(Web、Standard 和 Enterprise)的定价,可参阅适用于 WindowsLinux 的 Azure VM 定价页。You can see the pricing for the different SQL Server editions (Web, Standard, Enterprise) in the Azure VM pricing page for Windows or Linux.

所有版本的 SQL Server(2012 SP3 到 2017)的费用相同。The cost is the same for all versions of SQL Server (2012 SP3 to 2017). 每秒许可成本取决于 VM vCPU 的数量。The per-second licensing cost depends on the number of VM vCPUs.

建议在以下情况采用“提前支付 SQL Server 许可费用”:Paying the SQL Server licensing in Advanced is recommended for:

  • 临时或定期工作负荷Temporary or periodic workloads. 例如,某应用每年需支持某事件几个月,或需在星期一支持业务分析。For example, an app that needs to support an event for a couple of months every year, or business analysis on Mondays.

  • 生存期或规模未知的工作负荷Workloads with unknown lifetime or scale. 例如,某应用可能在几个月内无需使用,或可能需要提高/降低计算能力(具体取决于需求)。For example, an app that may not be required in a few months, or which may require more, or less compute power, depending on demand.

若要使用上述某个预付费映像创建 SQL Server 2017 Azure VM,请参阅以下链接:To create a SQL Server 2017 Azure VM with one of these Pay-In-Advance images, see the following links:

平台Platform 许可的映像Licensed images
Windows Server 2016Windows Server 2016 SQL Server 2017 Web Azure VMSQL Server 2017 Web Azure VM
SQL Server 2017 Standard Azure VMSQL Server 2017 Standard Azure VM
SQL Server 2017 Enterprise Azure VMSQL Server 2017 Enterprise Azure VM
UbuntuUbuntu SQL Server 2017 Web Azure VMSQL Server 2017 Web Azure VM
SQL Server 2017 Standard Azure VMSQL Server 2017 Standard Azure VM
SQL Server 2017 Enterprise Azure VMSQL Server 2017 Enterprise Azure VM


在 Azure 门户中创建 SQL Server 虚拟机时,“选择大小”窗口显示估算成本。 When you create a SQL Server virtual machine in the portal, the Choose a size window shows an estimated cost. 请务必注意,此估算成本仅仅是运行 VM 所产生的计算成本,以及任意 OS 许可成本(Windows 或第三方 Linux 操作系统)。It is important to note that this estimate is only the compute costs for running the VM along with any OS licensing costs (Windows or third-party Linux operating systems).

“选择 VM 大小”边栏选项卡

而不包括 Web、Standard 和 Enterprise 版本的其他 SQL Server 许可成本。It does not include additional SQL Server licensing costs for Web, Standard, and Enterprise editions. 若要获取最准确的估算定价,请在适用于 WindowsLinux 的定价页上选择操作系统和 SQL Server 版本。To get the most accurate pricing estimate, select your operating system and SQL Server edition on the pricing page for Windows or Linux.

自带许可证 (BYOL)Bring your own license (BYOL)

“通过许可移动性使用自己的 SQL Server 许可证” (也称为BYOL)是指在 Azure VM 中使用带软件保障的现有 SQL Server 批量许可证。Bringing your own SQL Server license through License Mobility, also referred to as BYOL, means using an existing SQL Server Volume License with Software Assurance in an Azure VM. 使用 BYOL 的 SQL Server VM 仅收取 VM 运行费用,而不收取 SQL Server 许可的费用,前提是已通过批量许可计划获得许可证和软件保障。A SQL Server VM using BYOL only charges for the cost of running the VM, not for SQL Server licensing, given that you have already acquired licenses and Software Assurance through a Volume Licensing program.


BYOL 映像需要具有软件保障的企业协议。BYOL images require an Enterprise Agreement with Software Assurance. 目前,它们未作为 Azure 云解决方案合作伙伴 (CSP) 的一部分提供。They are not available as a part of the Azure Cloud Solution Partner (CSP) at this time.


BYOL 映像目前仅适用于 Windows 虚拟机。The BYOL images are currently only available for Windows virtual machines. 但是,可以在仅限 Linux 的 VM 上手动安装 SQL Server。However, you can manually install SQL Server on a Linux-only VM. 请参阅 Linux SQL VM 常见问题解答中的指导原则。See the guidelines in the Linux SQL VM FAQ.

建议在以下情况采用“通过许可移动性使用自己的 SQL Server 许可”:Bringing your own SQL licensing through License Mobility is recommended for:

  • 持续工作负荷Continuous workloads. 例如,需全天候支持业务运营的应用。For example, an app that needs to support business operations 24x7.

  • 生存期和规模已知的工作负荷Workloads with known lifetime and scale. 例如,全年需要且已预测其需求的应用。For example, an app that is required for the whole year and which demand has been forecasted.

若要对 SQL Server VM 使用 BYOL,必须拥有 SQL Server Standard 或 Enterprise 的许可证以及软件保障,这是通过某些批量许可计划的必需选项,而对其他计划而言为可选购买项。To use BYOL with a SQL Server VM, you must have a license for SQL Server Standard or Enterprise and Software Assurance, which is a required option through some volume licensing programs and an optional purchase with others. 根据协议类型以及 SQL Server 的数量和/或对其的承诺,批量许可计划提供的定价级别各不相同。The pricing level provided through Volume Licensing programs varies, based on the type of agreement and the quantity and or commitment to SQL Server. 但一般而言,针对连续生产工作负荷自带许可证具有以下优点:But as a rule of thumb, bringing your own license for continuous production workloads has the following benefits:

BYOL 权益BYOL benefit 说明Description
节省费用 Cost savings Azure 混合权益可节省高达 55% 的成本。The Azure Hybrid Benefit offers up to 55% savings.
免费的被动辅助副本 Free passive secondary replica 自带许可证的另一项好处是每个 SQL Server 免费许可 1 个被动辅助副本以实现高可用性。Another benefit of bringing your own license is the free licensing for one passive secondary replica per SQL Server for high availability purposes. 这会高度可用的 SQL Server 部署(例如使用 Always On 可用性组)的许可成本减少了一半。This cuts in half the licensing cost of a highly available SQL Server deployment (for example, using Always On Availability Groups). 通过故障转移服务器软件保障权益,可享用被动辅助副本的运行权限。The rights to run the passive secondary are provided through the Fail-Over Servers Software Assurance benefit.

若要使用上述某个自带许可证映像创建 SQL Server 2017 Azure VM,请参阅前缀为“{BYOL}”的 VM:To create a SQL Server 2017 Azure VM with one of these bring-your-own-license images, see the VMs prefixed with "{BYOL}":


请于 10 日内告知我们正在 Azure 中使用的 SQL Server 许可证数。Let us know within 10 days how many SQL Server licenses you are using in Azure. 上述映像的链接具有如何执行此操作的说明。The links to the previous images have instructions on how to do this.

降低成本Reduce costs

为了避免不必要的成本,请选择最佳的虚拟机大小,并考虑间歇性关闭非连续的工作负荷。To avoid unnecessary costs, choose an optimal virtual machine size and consider intermittent shutdowns for non-continuous workloads.

正确调整 VM 的大小Correctly size your VM

SQL Server 的许可成本直接与 vCPU 数相关。The licensing cost of SQL Server is directly related to the number of vCPUs. 请选择与 CPU、内存、存储和 I/O 带宽需求相符的 VM 大小。Choose a VM size that matches your expected needs for CPU, memory, storage, and I/O bandwidth. 有关计算机大小选项的完整列表,请参阅 Windows VM 大小Linux VM 大小For a complete list of machine size options, see Windows VM sizes and Linux VM sizes.

有一些新的计算机大小能够很好地适应特定类型的 SQL Server 工作负荷。There are new machine sizes that work well with certain types of SQL Server workloads. 这些计算机大小保留较高级别的内存、存储和 I/O 带宽,但虚拟化核心数较少。These machines sizes maintain high levels of memory, storage, and I/O bandwidth, but they have a lower virtualized core count. 例如,考虑以下情况:For example, consider the following example:

VM 大小VM Size vCPUvCPUs 内存Memory 最大磁盘数Max Disks 最大 I/O 吞吐量Max I/O Throughput SQL 许可成本SQL licensing costs 总成本(计算 + 许可)Total costs (Compute + licensing)
Standard_DS14v2Standard_DS14v2 1616 112 GB112 GB 3232 51,200 IOPS 或 768 MB/秒51,200 IOPS or 768 MB/s
Standard_DS14-4v2Standard_DS14-4v2 44 112 GB112 GB 3232 51,200 IOPS 或 768 MB/秒51,200 IOPS or 768 MB/s 低 75%75% lower 低 57%57% lower


这是一个时间点示例。This is a point-in-time example. 有关最新的规范,请参阅适用于 WindowsLinux 的计算机大小文章和 Azure 定价页。For the most recent specifications, refer to the machine sizes articles and the Azure pricing page for Windows and Linux.

在前面的示例中可以看到,除 vCPU 以外,Standard_DS14v2Standard_DS14-4v2 的规范在其他方面相同。In the previous example, you can see that the specifications for Standard_DS14v2 and Standard_DS14-4v2 are identical except for vCPUs. Standard_DS14-4v2 计算机大小末尾的后缀 -4v2 表示活动的 vCPU 数目。The suffix -4v2 at the end of the Standard_DS14-4v2 machine size indicates the number of active vCPUs. 由于 SQL Server 许可成本与 vCPU 数密切相关,因此,在不需要额外的 vCPU 的情况下,此计算机大小可以大幅降低 VM 的成本。Because SQL Server licensing costs are tied to the number of vCPUs, this significantly reduces the cost of the VM in scenarios where the extra vCPUs are not needed. 这只是其中一个示例,还有许多计算机大小的 vCPU 数目受到限制,具体数字以此后缀模式标识。This is one example, and there are many machine sizes with constrained vCPUs that are identified with this suffix pattern. 有关详细信息,请参阅博客文章 Announcing new Azure VM sizes for more cost-effective database work(宣布推出新的 Azure VM 大小来提高数据库工作的性价比)。For more information, see the blog post Announcing new Azure VM sizes for more cost-effective database work.

后续步骤Next steps

有关常规 Azure 定价指南,请参阅通过 Azure 计费和成本管理来防止意外成本For general Azure pricing guidance, see Prevent unexpected costs with Azure billing and cost management. 有关最新的虚拟机定价(包括 SQL Server),请参阅适用于 Windows VMLinux VM 的 Azure VM Azure 定价页。For the latest Virtual Machines pricing, including SQL Server, see the Azure VM Azure pricing page for Windows VMs and Linux VMs.

有关 Azure 虚拟机上运行的 SQL Server 概述,请参阅以下文章:For an overview of SQL Server running on Azure Virtual Machines, see the following articles: