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

什么是 Azure SQL?What is Azure SQL?

适用于: Azure SQL 数据库 Azure SQL 托管实例 Azure VM 上的 SQL Server

Azure SQL 是一系列智能安全的托管产品,它们使用 Azure 云中的 SQL Server 数据库引擎。Azure SQL is a family of managed, secure, and intelligent products that use the SQL Server database engine in the Azure cloud.

  • Azure SQL 数据库:支持对智能的托管数据库服务(包括无服务器计算)使用现代云应用程序。Azure SQL Database: Support modern cloud applications on an intelligent, managed database service, that includes serverless compute.
  • Azure SQL 托管实例:大规模地实现现有 SQL Server 应用程序的现代化,其中智能且完全托管的实例用作服务,且与 SQL Server 数据库引擎之间的功能奇偶一致性几乎达 100%。Azure SQL Managed Instance: Modernize your existing SQL Server applications at scale with an intelligent fully managed instance as a service, with almost 100% feature parity with the SQL Server database engine. 最适合用于大部分云迁移方案。Best for most migrations to the cloud.
  • Azure VM 中的 SQL Server:轻松地直接迁移 SQL Server 工作负载,保持 100% 的 SQL Server 兼容性和操作系统级别的访问权限。SQL Server on Azure VMs: Lift-and-shift your SQL Server workloads with ease and maintain 100% SQL Server compatibility and operating system-level access.

Azure SQL 是基于熟悉的 SQL Server 引擎构建的,因此你可轻松迁移应用程序,继续使用熟悉的工具、语言和资源。Azure SQL is built upon the familiar SQL Server engine, so you can migrate applications with ease and continue to use the tools, languages, and resources you're familiar with. 你的技能和经验同样适用于云,因此你可运用已学知识实现更多目标。Your skills and experience transfer to the cloud, so you can do even more with what you already have.

了解每款产品如何契合 Microsoft 的 Azure SQL 数据平台,以与适合你业务需求的选项相符。Learn how each product fits into Microsoft's Azure SQL data platform to match the right option for your business requirements. 无论你是优先考虑成本节省还是精简管理,本文都会帮助你确定哪种方法能够满足你最重视的业务要求。Whether you prioritize cost savings or minimal administration, this article can help you decide which approach delivers against the business requirements you care about most.

如果你不熟悉 Azure SQL,请观看我们深度讲解的 Azure SQL 视频系列中的“什么是 Azure SQL”视频:If you're new to Azure SQL, check out the What is Azure SQL video from our in-depth Azure SQL video series:


如何完善 Azure SQL?How can we make Azure SQL better? 参与调查Take the survey.


在当今数据驱动的世界中,推动数字化转型越来越取决于我们管理大量数据并挖掘其潜力的能力。In today's data-driven world, driving digital transformation increasingly depends on our ability to manage massive amounts of data and harness its potential. 但如今的数据资产日益复杂,数据托管在本地、云或网络边缘。But today's data estates are increasingly complex, with data hosted on-premises, in the cloud, or at the edge of the network. 构建智能和沉浸式应用程序的开发人员可能会发现自己受到限制的束缚,而这些限制最终可能会影响他们的体验。Developers who are building intelligent and immersive applications can find themselves constrained by limitations that can ultimately impact their experience. 平台不兼容、数据不够安全、资源不足和性价比障碍等原因造成的限制会导致应用现代化和开发变得更加复杂。Limitations arising from incompatible platforms, inadequate data security, insufficient resources and price-performance barriers create complexity that can inhibit app modernization and development.

在 Azure 与本地 SQL Server 数据库的任何介绍中,要了解的要点之一是可以同时使用两者。One of the first things to understand in any discussion of Azure versus on-premises SQL Server databases is that you can use it all. Microsoft 数据平台利用 SQL Server 技术,使其可在跨本地物理计算机、私有云环境、第三方托管的私有云环境和公有云中使用。Microsoft's data platform leverages SQL Server technology and makes it available across physical on-premises machines, private cloud environments, third-party hosted private cloud environments, and the public cloud.

完全托管并始终保持最新Fully managed and always up to date

花更多时间进行创新,减少修补、更新和备份数据库所耗的时间。Spend more time innovating and less time patching, updating, and backing up your databases. Azure 是唯一具有长效 SQL 的云,后者能够自动应用最新的更新和补丁程序,使数据库始终保持最新状态,从而消除了支持终止带来的麻烦。Azure is the only cloud with evergreen SQL that automatically applies the latest updates and patches so that your databases are always up to date—eliminating end-of-support hassle. 甚至可自动执行复杂的任务,例如性能优化、高可用性、灾难恢复和备份,使你能够专注于应用程序。Even complex tasks like performance tuning, high availability, disaster recovery, and backups are automated, freeing you to focus on applications.

利用内置的智能安全性保护你的数据Protect your data with built-in intelligent security

Azure 会持续监视你的数据是否受到威胁。Azure constantly monitors your data for threats. 借助 Azure SQL,你可以:With Azure SQL, you can:

  • 通过智能高级威胁检测和主动漏洞评估警报,实时修正潜在威胁。Remediate potential threats in real time with intelligent advanced threat detection and proactive vulnerability assessment alerts.
  • 使用内置安全控件(包括 T-SQL、身份验证、网络和密钥管理)获得业界领先的多层保护。Get industry-leading, multi-layered protection with built-in security controls including T-SQL, authentication, networking, and key management.
  • 充分利用任何云数据库服务最全面的符合性Take advantage of the most comprehensive compliance coverage of any cloud database service.

业务驱动因素Business motivations

有多个因素可能会影响你在不同数据产品/服务之间所做的选择:There are several factors that can influence your decision to choose between the different data offerings:

  • 成本:PaaS 和 IaaS 选项都包括基本价格,其中涵盖了底层基础结构和许可证的费用。Cost: Both PaaS and IaaS option include base price that covers underlying infrastructure and licensing. 但是,使用 IaaS 选项时,需要投入额外的时间和资源来管理数据库,而 PaaS 的价格已包括这些管理功能的费用。However, with IaaS option you need to invest additional time and resources to manage your database, while in PaaS you get these administration features included in the price. 借助 IaaS 选项可在不使用资源时将其关闭来降低成本;对于 PaaS,除非删除资源,然后在需要时重新创建资源,否则它会一直运行。IaaS enables you to shut down resources while you are not using them to decrease the cost, while PaaS is always running unless you drop and re-create your resources when they are needed.
  • 管理:PaaS 选项可减少管理数据库所需投入的时间。Administration: PaaS options reduce the amount of time that you need to invest to administer the database. 但是,它还会限制你可以执行或运行的自定义管理任务和脚本的范围。However, it also limits the range of custom administration tasks and scripts that you can perform or run. 例如,SQL 数据库不支持 CLR,但 SQL 托管实例的实例支持 CLR。For example, the CLR is not supported with SQL Database, but is supported for an instance of SQL Managed Instance. 此外,PaaS 中没有部署选项支持使用跟踪标志。Also, no deployment options in PaaS support the use of trace flags.
  • 服务级别协议:IaaS 和 PaaS 都提供较高的行业标准 SLA。Service-level agreement: Both IaaS and PaaS provide high, industry standard SLA. 在基础结构方面,PaaS 选项保证 99.99% 的 SLA,而 IaaS 保证 99.95% 的 SLA,这意味着,需要实施附加的机制才能确保数据库的可用性。PaaS option guarantees 99.99% SLA, while IaaS guarantees 99.95% SLA for infrastructure, meaning that you need to implement additional mechanisms to ensure availability of your databases. 可获得 99.99% 的 SLA,只需创建附加的 SQL 虚拟机并实现 SQL Server Always On 可用性组高可用性解决方案即可。You can attain 99.99% SLA by creating an additional SQL virtual machine, and implementing the SQL Server Always On availability group high availability solution.
  • 迁移到 Azure 所需的时间:Azure VM 中 SQL Server 与你的环境完全匹配,因此从本地迁移到 Azure VM 与在不同的本地服务器之间迁移数据库没有什么不同。Time to move to Azure: SQL Server on Azure VM is the exact match of your environment, so migration from on-premises to the Azure VM is no different than moving the databases from one on-premises server to another. SQL 托管实例还可实现轻松迁移;但是,可能需要在迁移之前应用某些更改。SQL Managed Instance also enables easy migration; however, there might be some changes that you need to apply before your migration.

服务比较Service comparison

云 SQL Server 选项:IaaS 上的 SQL Server,或云中的 SaaS SQL 数据库。

如图所示,每款服务产品可根据你在基础结构中所拥有的管理级别,以及成本效益程度等特征进行分类。As seen in the diagram, each service offering can be characterized by the level of administration you have over the infrastructure, and by the degree of cost efficiency.

在 Azure 中,可让 SQL Server 工作负荷作为托管服务 (PaaS) 或托管基础结构 (IaaS) 运行。In Azure, you can have your SQL Server workloads running as a hosted service (PaaS), or a hosted infrastructure (IaaS). 在 PaaS 中有多个产品选项,每个选项中有多个服务层级。Within PaaS, you have multiple product options, and service tiers within each option. 在 PaaS 与 IaaS 之间作出抉择时,需要提出的一个重要问题是,你是要自行管理数据库、应用修补程序、创建备份,还是将这些操作委托给 Azure?The key question that you need to ask when deciding between PaaS or IaaS is do you want to manage your database, apply patches, and take backups, or do you want to delegate these operations to Azure?

Azure SQL 数据库Azure SQL Database

Azure SQL 数据库是 Azure 中托管的关系数据库即服务 (DBaaS),属于“平台即服务 (PaaS)”行业类别。Azure SQL Database is a relational database-as-a-service (DBaaS) hosted in Azure that falls into the industry category of Platform-as-a-Service (PaaS).

  • 最适合用于需要使用最新的 SQL Server 稳定功能,且开发与面市时间有限的新式云应用程序。Best for modern cloud applications that want to use the latest stable SQL Server features and have time constraints in development and marketing.
  • 完全托管的 SQL Server 数据库引擎,基于最新稳定的 SQL Server Enterprise Edition。A fully managed SQL Server database engine, based on the latest stable Enterprise Edition of SQL Server. SQL 数据库有两个部署选项,每个选项都以 Microsoft 所拥有、托管及维护的标准化硬件和软件为基础。SQL Database has two deployment options built on standardized hardware and software that is owned, hosted, and maintained by Microsoft.

在 SQL Server 中,无论是本地的还是 Azure 虚拟机中,都可使用需要进行广泛配置的内置特性和功能。With SQL Server, you can use built-in features and functionality that requires extensive configuration (either on-premises or in an Azure virtual machine). 使用 SQL 数据库时,可以即用即付,并使用向上或向外缩放选项获得更强大的功能且不会中断服务。When using SQL Database, you pay-as-you-go with options to scale up or out for greater power with no interruption. SQL 数据库具有 SQL Server 所不能提供的其他一些功能,例如,内置的高可用性、智能和管理。SQL Database has some additional features that are not available in SQL Server, such as built-in high availability, intelligence, and management.

Azure SQL 数据库提供了以下部署选项:Azure SQL Database offers the following deployment options:

  • 充当自带资源集的单一数据库,该资源集通过逻辑 SQL 服务器进行托管。As a single database with its own set of resources managed via a logical SQL server. 单一数据库类似于 SQL Server 中的包含的数据库A single database is similar to a contained database in SQL Server. 此选项已针对新式应用程序开发进行优化,可用于开发新型的云原生应用程序。This option is optimized for modern application development of new cloud-born applications. 可以使用超大规模无服务器选项。Hyperscale and serverless options are available.
  • 弹性池:一个数据库集合,具有通过逻辑 SQL 服务器管理的一组共享资源。An elastic pool, which is a collection of databases with a shared set of resources managed via a logical SQL server. 可以将单一数据库移入或移出弹性池。Single databases can be moved into and out of an elastic pool. 此选项已针对新式应用程序开发进行优化,可用于使用多租户 SaaS 应用程序模式开发新型的云原生应用程序。This option is optimized for modern application development of new cloud-born applications using the multi-tenant SaaS application pattern. 弹性池提供经济高效的解决方案用于管理使用模式可变的多个数据库的性能。Elastic pools provide a cost-effective solution for managing the performance of multiple databases that have variable usage patterns.

Azure SQL 托管实例Azure SQL Managed Instance

Azure SQL 托管实例属于“平台即服务 (PaaS)”行业类别,是大多数云迁移的最佳选择。Azure SQL Managed Instance falls into the industry category of Platform-as-a-Service (PaaS), and is best for most migrations to the cloud. SQL 托管实例是系统和用户数据库的集合,包含一组随时可直接迁移的共享资源。SQL Managed Instance is a collection of system and user databases with a shared set of resources that is lift-and-shift ready.

  • 最适合用于需要使用最新的 SQL Server 稳定功能,并且在进行极少量更改的情况下迁移到云中的新应用程序或现有本地应用程序。Best for new applications or existing on-premises applications that want to use the latest stable SQL Server features and that are migrated to the cloud with minimal changes. SQL 托管实例的实例与 Microsoft SQL Server 数据库引擎的实例类似,为数据库和实例范围内的其他功能提供共享资源。An instance of SQL Managed Instance is similar to an instance of the Microsoft SQL Server database engine offering shared resources for databases and additional instance-scoped features.
  • SQL 托管实例支持从本地迁移数据库,只要求对数据库进行极少量的更改,甚至根本不需要更改。SQL Managed Instance supports database migration from on-premises with minimal to no database change. 此选项提供 Azure SQL 数据库的所有 PaaS 优势,同时还添加了以前只在 SQL Server VM 中提供的功能。This option provides all of the PaaS benefits of Azure SQL Database but adds capabilities that were previously only available in SQL Server VMs. 这包括本机虚拟网络,以及与本地 SQL Server 的近乎 100% 的兼容性。This includes a native virtual network and near 100% compatibility with on-premises SQL Server. SQL 托管实例的实例提供完全的 SQL Server 访问和功能兼容性,可用于将 SQL Server 迁移到 Azure。Instances of SQL Managed Instance provide full SQL Server access and feature compatibility for migrating SQL Servers to Azure.

Azure VM 上的 SQL ServerSQL Server on Azure VM

Azure VM 上的 SQL Server 属于“基础结构即服务 (IaaS)”行业类别,可让你在 Azure 中完全托管的虚拟机 (VM) 上运行 SQL Server。SQL Server on Azure VM falls into the industry category Infrastructure-as-a-Service (IaaS) and allows you to run SQL Server inside a fully managed virtual machine (VM) in Azure.

  • 在云中安装和托管的 SQL Server 将在 Azure 上运行的 Windows Server 或 Linux 虚拟机上运行,也称为基础结构即服务 (IaaS)。SQL Server installed and hosted in the cloud runs on Windows Server or Linux virtual machines running on Azure, also known as an infrastructure as a service (IaaS). SQL 虚拟机非常适合用于迁移本地 SQL Server 数据库和应用程序,无需进行任何数据库更改。SQL virtual machines are a good option for migrating on-premises SQL Server databases and applications without any database change. 所有当前 SQL Server 版本都可安装在 IaaS 虚拟机中。All recent versions and editions of SQL Server are available for installation in an IaaS virtual machine.
  • 最适合用于需要 OS 级别访问的迁移和应用程序。Best for migrations and applications requiring OS-level access. Azure 中的 SQL 虚拟机随时可直接迁移,适用于需要快速迁移到云中且只需进行极少量更改甚至不需要任何更改的现有应用程序。SQL virtual machines in Azure are lift-and-shift ready for existing applications that require fast migration to the cloud with minimal changes or no changes. SQL 虚拟机针对要迁移到 Azure 的 SQL Server 实例和底层 OS 提供全面的管理控制度。SQL virtual machines offer full administrative control over the SQL Server instance and underlying OS for migration to Azure.
  • 与 SQL 数据库和 SQL 托管实例之间最重要的差别在于,可使用 Azure 虚拟机上的 SQL Server 完全控制数据库引擎。The most significant difference from SQL Database and SQL Managed Instance is that SQL Server on Azure Virtual Machines allows full control over the database engine. 可以选择维护/修补开始时间、将恢复模式更改为简单模式或批量记录模式、根据需要暂停或启动服务,并且可以完全自定义 SQL Server 数据库引擎。You can choose when to start maintenance/patching, change the recovery model to simple or bulk-logged, pause or start the service when needed, and you can fully customize the SQL Server database engine. 控制度的提高也意味着在管理虚拟机方面需要承担更大的责任。With this additional control comes the added responsibility to manage the virtual machine.
  • 想要快速完成开发和测试方案,但又不想购买本地 SQL Server 非生产硬件。Rapid development and test scenarios when you do not want to buy on-premises non-production SQL Server hardware. SQL 虚拟机也在 Microsoft 所拥有、托管及维护的标准化硬件上运行。SQL virtual machines also run on standardized hardware that is owned, hosted, and maintained by Microsoft. 使用 SQL 虚拟机时,既可使用 SQL Server 映像中已包含的 SQL Server 许可证即用即付,也可轻松使用现有的许可证。When using SQL virtual machines, you can either pay-as-you-go for a SQL Server license already included in a SQL Server image or easily use an existing license. 还可以根据需要停止或恢复 VM。You can also stop or resume the VM as needed.
  • 已针对将现有应用程序迁移到 Azure 或将现有本地应用程序扩展到混合部署中的云进行了优化。Optimized for migrating existing applications to Azure or extending existing on-premises applications to the cloud in hybrid deployments. 此外,可以使用虚拟机中的 SQL Server 开发和测试传统 SQL Server 应用程序。In addition, you can use SQL Server in a virtual machine to develop and test traditional SQL Server applications. 有了 SQL 虚拟机,即拥有了专用 SQL Server 实例和基于云的 VM 的完全管理权限。With SQL virtual machines, you have the full administrative rights over a dedicated SQL Server instance and a cloud-based VM. 当组织拥有可用来维护虚拟机的 IT 资源时,此选项是最佳选择。It is a perfect choice when an organization already has IT resources available to maintain the virtual machines. 使用这些功能可以构建高度定制的系统,解决应用程序的具体性能与可用性要求。These capabilities allow you to build a highly customized system to address your application’s specific performance and availability requirements.

比较表Comparison table

下表列出了其他差别,但 SQL 数据库和 SQL 托管实例都经过优化,可将预配和管理许多数据库的整体管理成本降到最低。Additional differences are listed in the following table, but both SQL Database and SQL Managed Instance are optimized to reduce overall management costs to a minimum for provisioning and managing many databases. 由于无需管理任何虚拟机、操作系统或数据库软件,因此可持续降低管理成本。Ongoing administration costs are reduced since you do not have to manage any virtual machines, operating system, or database software. 用户不必管理升级、高可用性或备份You do not have to manage upgrades, high availability, or backups.

一般而言,SQL 数据库和 SQL 托管实例会大幅增加由单个 IT 或开发资源管理的数据库数目。In general, SQL Database and SQL Managed Instance can dramatically increase the number of databases managed by a single IT or development resource. 弹性池也支持 SaaS 多租户应用程序体系结构,提供租户隔离等功能,并可以跨数据库共享资源,通过缩放来降低成本。Elastic pools also support SaaS multi-tenant application architectures with features including tenant isolation and the ability to scale to reduce costs by sharing resources across databases. SQL 托管实例支持面向实例的功能,可用于轻松迁移现有应用程序,以及在数据库之间共享资源。SQL Managed Instance provides support for instance-scoped features enabling easy migration of existing applications, as well as sharing resources among databases. Azure VM 上的 SQL Server 为 DBA 提供与他们熟悉的本地环境最相似的体验。Whereas, SQL Server on Azure VMs provide DBAs with an experience most similar to the on-premises environment they're familiar with.

Azure SQL 数据库Azure SQL Database Azure SQL 托管实例Azure SQL Managed Instance Azure VM 上的 SQL ServerSQL Server on Azure VM
支持大多数本地数据库级功能。Supports most on-premises database-level capabilities. 提供最常用的 SQL Server 功能。The most commonly used SQL Server features are available.
保证 99.995% 的可用性。99.995% availability guaranteed.
内置备份、修补和恢复。Built-in backups, patching, recovery.
最新稳定的数据库引擎版本。Latest stable Database Engine version.
可将必要的资源(CPU/存储)分配到单个数据库。Ability to assign necessary resources (CPU/storage) to individual databases.
内置高级智能和安全性。Built-in advanced intelligence and security.
联机更改资源(CPU/存储)。Online change of resources (CPU/storage).
几乎支持所有的本地实例级和数据库级功能。Supports almost all on-premises instance-level and database-level capabilities. 与 SQL Server 高度兼容。High compatibility with SQL Server.
保证 99.99% 的可用性。99.99% availability guaranteed.
内置备份、修补和恢复。Built-in backups, patching, recovery.
最新稳定的数据库引擎版本。Latest stable Database Engine version.
从 SQL Server 轻松迁移。Easy migration from SQL Server.
Azure 虚拟网络中的专用 IP 地址。Private IP address within Azure Virtual Network.
内置高级智能和安全性。Built-in advanced intelligence and security.
联机更改资源(CPU/存储)。Online change of resources (CPU/storage).
可以完全控制 SQL Server 引擎。You have full control over the SQL Server engine. 支持所有本地功能。Supports all on-premises capabilities.
高达 99.99% 的可用性。Up to 99.99% availability.
完全可与匹配的本地 SQL Server 版本搭配使用。Full parity with the matching version of on-premises SQL Server.
固定的已知数据库引擎版本。Fixed, well-known Database Engine version.
从 SQL Server 轻松迁移。Easy migration from SQL Server.
Azure 虚拟网络中的专用 IP 地址。Private IP address within Azure Virtual Network.
可将应用程序或服务部署到 SQL Server 所在的主机上。You have the ability to deploy application or services on the host where SQL Server is placed.
可能难以从 SQL Server 迁移。Migration from SQL Server might be challenging.
某些 SQL Server 功能不可用。Some SQL Server features are not available.
不保证确切的维护时间(但几乎是透明的)。No guaranteed exact maintenance time (but nearly transparent).
只能使用数据库兼容性级别来实现与 SQL Server 版本的兼容。Compatibility with the SQL Server version can be achieved only using database compatibility levels.
Azure 专用链接支持专用 IP 地址。Private IP address support with Azure Private Link.
仍有极少量的 SQL Server 功能不可用。There is still some minimal number of SQL Server features that are not available.
不保证确切的维护时间(但几乎是透明的)。No guaranteed exact maintenance time (but nearly transparent).
只能使用数据库兼容性级别来实现与 SQL Server 版本的兼容。Compatibility with the SQL Server version can be achieved only using database compatibility levels.
需要自行管理备份和修补程序。You need to manage your backups and patches.
需要实施高可用性解决方案。You need to implement your own High-Availability solution.
更改资源(CPU/存储)会造成停机There is a downtime while changing the resources(CPU/storage)
最多 100 TB 的数据库。Databases of up to 100 TB. 最多 8 TB。Up to 8 TB. 具有高达 256 TB 存储空间的 SQL Server 实例。SQL Server instances with up to 256 TB of storage. 实例可以支持所需数量的数据库。The instance can support as many databases as needed.
本地应用程序可以访问 Azure SQL 数据库中的数据。On-premises application can access data in Azure SQL Database. 使用 Azure Express Route 或 VPN 网关实现本机虚拟网络并连接到本地环境。Native virtual network implementation and connectivity to your on-premises environment using Azure Express Route or VPN Gateway. 借助 SQL 虚拟机,应用程序可以一部分在云中运行,一部分在本地运行。With SQL virtual machines, you can have applications that run partly in the cloud and partly on-premises. 例如,可以通过 Azure 虚拟网络,将本地网络和 Active Directory 域扩展到云中。For example, you can extend your on-premises network and Active Directory Domain to the cloud via Azure Virtual Network. 有关混合云解决方案的详细信息,请参阅将本地数据解决方案扩展到云For more information on hybrid cloud solutions, see Extending on-premises data solutions to the cloud.


无论你是现金不足的新公司,或是在预算有限的情况下运作的已成立公司的小组,资金的限制通常是决定数据库托管方式的主要考虑因素。Whether you're a startup that is strapped for cash, or a team in an established company that operates under tight budget constraints, limited funding is often the primary driver when deciding how to host your databases. 在本部分中,你将学习 Azure 中与 Azure SQL 服务系列相关联的计费和许可方面的基础知识。In this section, you learn about the billing and licensing basics in Azure associated with the Azure SQL family of services. 此外,还介绍如何计算应用程序总成本。You also learn about calculating the total application cost.

计费和许可基础概念Billing and licensing basics

目前,SQL 数据库和 SQL 托管实例均以服务的形式出售,提供了多个选项和多个服务层级,不同资源采用不同的价格,所有资源根据你选择的服务层级和计算大小以固定费率按小时计费 。Currently, both SQL Database and SQL Managed Instance are sold as a service and are available with several options and in several service tiers with different prices for resources, all of which are billed hourly at a fixed rate based on the service tier and compute size you choose. 有关当前支持的服务层级、计算大小和存储量的最新信息,请参阅 SQL 数据库基于 DTU 的购买模型SQL 数据库和 SQL 托管实例基于 vCore 的购买模型For the latest information on the current supported service tiers, compute sizes, and storage amounts, see DTU-based purchasing model for SQL Database and vCore-based purchasing model for both SQL Database and SQL Managed Instance.

  • 使用 SQL 数据库时,可根据需求选择各种价格的服务层级(起步价为基本层级的每月 5 美元),你也可创建弹性池,在数据库之间共享资源,从而降低成本并应对使用高峰。With SQL Database, you can choose a service tier that fits your needs from a wide range of prices starting from 5$/month for basic tier and you can create elastic pools to share resources among databases to reduce costs and accommodate usage spikes.
  • 使用 SQL 托管实例时,还可以自带许可证。With SQL Managed Instance, you can also bring your own license. 有关自带许可的详细信息,请参阅 Azure 上通过软件保障实现的许可移动性,或使用 Azure 混合权益计算器来了解如何将成本最高节省 40%。For more information on bring-your-own licensing, see License Mobility through Software Assurance on Azure or use the Azure Hybrid Benefit calculator to see how to save up to 40%.

此外,需要对固定的 数据传输速率的 Internet 传出流量付费。In addition, you are billed for outgoing Internet traffic at regular data transfer rates. 可以动态调整服务层级和计算大小,以满足应用程序的不同吞吐量需求。You can dynamically adjust service tiers and compute sizes to match your application’s varied throughput needs.

使用 SQL 数据库和 SQL 托管实例时,Azure 会自动配置、修补和升级数据库软件,这可降低管理成本 。With SQL Database and SQL Managed Instance, the database software is automatically configured, patched, and upgraded by Azure, which reduces your administration costs. 此外,它的 内置备份 功能可帮助你大幅降低成本,尤其是拥有大量的数据库时。In addition, its built-in backup capabilities help you achieve significant cost savings, especially when you have a large number of databases.

在 Azure VM 上的 SQL 中,可使用平台提供的任何 SQL Server 映像(附带许可证),也可自带 SQL Server 许可证。With SQL on Azure VMs, you can use any of the platform-provided SQL Server images (which includes a license) or bring your SQL Server license. 所有受支持的 SQL Server 版本(2008R2、2012、2014、2016、2017、2019)和特别版(开发人员版、Express 版、Web 版、Standard 版、Enterprise 版)都可用。All the supported SQL Server versions (2008R2, 2012, 2014, 2016, 2017, 2019) and editions (Developer, Express, Web, Standard, Enterprise) are available. 此外,映像的自带许可版本 (BYOL) 也可用。In addition, Bring-Your-Own-License versions (BYOL) of the images are available. 使用 Azure 提供的映像时,营运成本取决于所选的 VM 大小以及 SQL Server 版本。When using the Azure provided images, the operational cost depends on the VM size and the edition of SQL Server you choose. 无论 VM 大小或 SQL Server 版本为何,都需要支付 SQL Server 和 Windows 或 Linux 服务器的每分钟许可成本,以及 VM 磁盘的 Azure 存储成本。Regardless of VM size or SQL Server edition, you pay per-minute licensing cost of SQL Server and the Windows or Linux Server, along with the Azure Storage cost for the VM disks. 每分钟计费选项可让你随时使用 SQL Server,而无需另外购买 SQL Server 许可证。The per-minute billing option allows you to use SQL Server for as long as you need without buying addition SQL Server licenses. 如果在 Azure 中使用自己的 SQL Server 许可证,则只需支付服务器和存储成本。If you bring your own SQL Server license to Azure, you are charged for server and storage costs only. 有关自带许可证的详细信息,请参阅 Azure 上通过软件保障实现的许可移动性For more information on bring-your-own licensing, see License Mobility through Software Assurance on Azure. 此外,需要对固定的 数据传输速率的 Internet 传出流量付费。In addition, you are billed for outgoing Internet traffic at regular data transfer rates.

计算应用程序总成本Calculating the total application cost

开始使用云平台时,运行应用程序的成本包括新开发成本和后续管理成本,以及公有云平台服务成本。When you start using a cloud platform, the cost of running your application includes the cost for new development and ongoing administration costs, plus the public cloud platform service costs.

有关定价的详细信息,请参阅以下资源:For more information on pricing, see the following resources:


对许多企业来说,决定过渡到到云服务的关键在于降低管理复杂度。For many businesses, the decision to transition to a cloud service is as much about offloading complexity of administration as it is cost. Azure 使用 IaaS 和 PaaS 管理底层基础结构和自动复制所有数据以提供灾难恢复,配置及升级数据库软件,管理负载均衡,并在数据中心发生服务器故障时执行透明的故障转移。With IaaS and PaaS, Azure administers the underlying infrastructure and automatically replicates all data to provide disaster recovery, configures and upgrades the database software, manages load balancing, and does transparent failover if there is a server failure within a data center.

  • 使用 SQL 数据库和 SQL 托管实例时,可继续管理数据库,但无需再管理数据库引擎、操作系统或硬件 。With SQL Database and SQL Managed Instance, you can continue to administer your database, but you no longer need to manage the database engine, the operating system, or the hardware. 可以继续管理的项目示例包括数据库和登录、索引和查询优化,以及审核和安全性。Examples of items you can continue to administer include databases and logins, index and query tuning, and auditing and security. 此外,在另一个数据中心配置高可用性只需极少量的配置和管理。Additionally, configuring high availability to another data center requires minimal configuration and administration.
  • 借助 Azure VM 上的 SQL,可完全掌控操作系统和 SQL Server 实例配置。With SQL on Azure VM, you have full control over the operating system and SQL Server instance configuration. 使用 VM,可以决定何时更新/升级操作系统与数据库软件,以及何时安装任何其他软件(例如防病毒软件)。With a VM, it's up to you to decide when to update/upgrade the operating system and database software and when to install any additional software such as anti-virus. 提供的某些自动化功能可以大大简化修补、备份和高可用性。Some automated features are provided to dramatically simplify patching, backup, and high availability. 此外,还可以控制 VM 的大小、磁盘数目及其存储配置。In addition, you can control the size of the VM, the number of disks, and their storage configurations. Azure 允许根据需要更改 VM 的大小。Azure allows you to change the size of a VM as needed. 有关信息,请参阅 Azure 的虚拟机和云服务大小For information, see Virtual Machine and Cloud Service Sizes for Azure.

服务级别协议 (SLA)Service-level agreement (SLA)

对于许多 IT 部门而言,首要任务是达到服务级别协议 (SLA) 规定的正常运行时间。For many IT departments, meeting up-time obligations of a service-level agreement (SLA) is a top priority. 本部分会说明 SLA 对每个数据库托管选项代表的含义。In this section, we look at what SLA applies to each database hosting option.

对于 Azure SQL 数据库和 Azure SQL 托管实例,Microsoft 提供 99.99% 的可用性 SLA。For both Azure SQL Database and Azure SQL Managed Instance, Microsoft provides an availability SLA of 99.99%. 有关最新信息,请参阅服务级别协议For the latest information, see Service-level agreement.

对于 Azure VM 上的 SQL,Microsoft 提供 99.95% 的可用性 SLA(仅涵盖虚拟机)。For SQL on Azure VM, Microsoft provides an availability SLA of 99.95% that covers just the virtual machine. 此 SLA 不涵盖 VM 上运行的进程(例如 SQL Server),并且要求你在可用性集中托管至少两个 VM 实例。This SLA does not cover the processes (such as SQL Server) running on the VM and requires that you host at least two VM instances in an availability set. 有关最新信息,请参阅 VM SLAFor the latest information, see the VM SLA. 为了在 VM 中实现数据库高可用性 (HA),应在 SQL Server 中配置受支持的高可用性选项之一,例如 Always On 可用性组For database high availability (HA) within VMs, you should configure one of the supported high availability options in SQL Server, such as Always On availability groups. 使用支持的高可用性选项不会提供更多 SLA,但使用户能够实现 >99.99% 的数据库可用性。Using a supported high availability option doesn't provide an additional SLA, but allows you to achieve >99.99% database availability.

迁移到 Azure 的时机Time to move to Azure

当开发人员的工作效率和新解决方案快速面市的时间至关重要时,适合使用 Azure SQL 数据库来处理面向云的应用程序。Azure SQL Database is the right solution for cloud-designed applications when developer productivity and fast time-to-market for new solutions are critical. 此选项提供类似于编程 DBA 的功能,非常适合云架构师和开发人员,因为它能降低管理基础操作系统和数据库的需求。With programmatic DBA-like functionality, it is perfect for cloud architects and developers as it lowers the need for managing the underlying operating system and database.

Azure SQL 托管实例大大简化了将现有应用程序迁移到 Azure 的过程,让你能够在 Azure 中将已迁移的数据库应用程序快速推向市场。Azure SQL Managed Instance greatly simplifies the migration of existing applications to Azure, enabling you to bring migrated database applications to market in Azure quickly.

如果现有或新的应用程序需要大型数据库或者需要访问 SQL Server 或 Windows/Linux 中的所有功能,而且你想要避免购置新本地硬件所耗的时间和费用,那么理想的选择是 Azure VM 上的 SQL。SQL on Azure VM is perfect if your existing or new applications require large databases or access to all features in SQL Server or Windows/Linux, and you want to avoid the time and expense of acquiring new on-premises hardware. 此外,如果想要将现有的本地应用程序和数据库按原样迁移到 Azure,而 SQL 数据库或 SQL 托管实例并不合适,则上述解决方案也是一个不错的选择。It is also a good fit when you want to migrate existing on-premises applications and databases to Azure as-is - in cases where SQL Database or SQL Managed Instance is not a good fit. 由于无需更改表示层、应用层和数据层,所以在重新构建现有解决方案时可以节省时间和预算。Since you do not need to change the presentation, application, and data layers, you save time and budget on re-architecting your existing solution. 相反地,可以将重点放在将所有解决方案迁移到 Azure,并执行 Azure 平台可能需要的某些性能优化。Instead, you can focus on migrating all your solutions to Azure and in doing some performance optimizations that may be required by the Azure platform. 有关详细信息,请参阅 Azure 虚拟机上 SQL Server 的性能最佳做法For more information, see Performance Best Practices for SQL Server on Azure Virtual Machines.

使用 Azure 门户创建和管理 Azure SQL 资源Create and manage Azure SQL resources with the Azure portal

Azure 门户提供了一个页面,可以在其中管理所有 Azure SQL 资源,包括 SQL 虚拟机。The Azure portal provides a single page where you can manage all of your Azure SQL resources including your SQL virtual machines.

若要访问 Azure SQL 页面,请从 Azure 门户菜单中选择 Azure SQL,或在任何页面搜索并选择 Azure SQL 。To access the Azure SQL page, from the Azure portal menu, select Azure SQL or search for and select Azure SQL in any page.


Azure SQL 提供了一种快捷简便的方式来访问你在 Azure 门户中的所有 SQL 资源,包括 Azure SQL 数据库中的单个和共用数据库,以及托管它们的逻辑 SQL Server、SQL 托管实例和 SQL 虚拟机。Azure SQL provides a quick and easy way to access all of your SQL resources in the Azure portal, including single and pooled database in Azure SQL Database as well as the logical SQL server hosting them, SQL Managed Instances, and SQL virtual machines. Azure SQL 不是服务或资源,而是一系列与 SQL 相关的服务。Azure SQL is not a service or resource, but rather a family of SQL-related services.

若要管理现有资源,请在列表中选择所需的项。To manage existing resources, select the desired item in the list. 若要创建新的 Azure SQL 资源,请选择“+ 添加”。To create new Azure SQL resources, select + Add.

Azure SQL 门户页

选择“+ 添加”后,可通过在任何磁贴上选择“显示详细信息”查看有关不同选项的其他信息。After selecting + Add, view additional information about the different options by selecting Show details on any tile.


有关详细信息,请参阅:For details, see:

后续步骤Next steps