在 Azure 中选择适当的 SQL Server 选项Choose the right SQL Server option in Azure

在 Azure 中,可让 SQL Server 工作负荷在托管的基础结构 (IaaS) 或托管的服务 (PaaS) 中运行。In Azure, you can have your SQL Server workloads running in a hosted infrastructure (IaaS) or running as a hosted service (PaaS). 在 PaaS 中,有多个部署选项,每个部署选项中有多个服务层。Within PaaS, you have multiple deployment options and service tiers within each deployment 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, take backups, or you want to delegate these operations to Azure? 根据具体的答案,可以选择以下选项:Depending on the answer, you have the following options:

  • Azure SQL 数据库:完全托管的 SQL 数据库引擎,基于最新稳定的 SQL Server Enterprise Edition。Azure SQL Database: A fully-managed SQL database engine, based on the latest stable Enterprise Edition of SQL Server. 这是托管在 Azure 云中的关系数据库即服务 (DBaaS),属于“平台即服务 (PaaS)”行业类别。This is a relational database-as-a-service (DBaaS) hosted in the Azure cloud that falls into the industry category of Platform-as-a-Service (PaaS). SQL 数据库有多个部署选项,每个选项都以 Azure 所拥有、托管及维护的标准化硬件和软件为基础。SQL database has multiple deployment options, each of which is built on standardized hardware and software that is owned, hosted, and maintained by Azure. 使用 SQL 数据库,可以使用当在 SQL Server(无论是本地的还是 Azure 虚拟机中的)中使用时需要进行广泛配置的内置特性和功能。With SQL Database, you can use built-in features and functionality that require extensive configuration when used in SQL Server (either on-premises or in an Azure virtual machine). 使用 SQL 数据库时,可以提前付费,并使用纵向或横向缩放选项获得更强大的功能,且不会中断服务。When using SQL Database, you pay-in-advance with options to scale up or out for greater power with no interruption. SQL 数据库具有 SQL Server 所不能提供的其他功能,例如,内置的高可用性、智能和管理。SQL Database has 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 SQL Database server. 单一数据库类似于 SQL Server 中的包含的数据库A single database is similar to a contained databases in SQL Server. 此选项已针对新式应用程序开发进行优化,可用于开发新型的云原生应用程序。This option is optimized for modern application development of new cloud-born applications.
    • 作为弹性池,它是一个数据库集合,具有通过 SQL 数据库服务器管理的共享资源集。An elastic pool, which is a collection of databases with a shared set of resources managed via a SQL Database 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.
  • Azure 虚拟机上的 SQL Server 属于“基础结构即服务 (IaaS)”行业类别,可让你在 Azure 云中的完全托管式虚拟机上运行 SQL Server。SQL Server on Azure Virtual Machines falls into the industry category Infrastructure-as-a-Service (IaaS) and allows you to run SQL Server inside a fully-managed virtual machine in the Azure cloud. SQL Server 虚拟机也在 Azure 所拥有、托管及维护的标准化硬件上运行。SQL Server virtual machines also run on standardized hardware that is owned, hosted, and maintained by Azure. 使用 VM 上的 SQL Server 时,可以提前支付 SQL Server 映像中已包含的 SQL Server 许可证费用,或者轻松使用现有的许可证。When using SQL Server on a VM, you can either pay-in-advance for a SQL Server license already included in a SQL Server image or easily use an existing license. 此外,可按需停止或恢复 VM。在 Azure 上运行的云中 Windows Server 或 Linux 虚拟机 (VM) 上安装并托管的 SQL Server 也称为基础结构即服务 (IaaS)。You can also stop or resume the VM as needed.SQL Server installed and hosted in the cloud on Windows Server or Linux virtual machines (VMs) running on Azure, also known as an infrastructure as a service (IaaS). Azure 虚拟机上的 SQL Server 非常适合用于迁移本地 SQL Server 数据库和应用程序,无需进行任何数据库更改。SQL Server on Azure virtual machines is 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. 与 SQL 数据库之间的最重要差别在于,SQL Server VM 允许完全控制数据库引擎。The most significant difference from SQL Database is that SQL Server VMs allow full control over the database engine. 可以选择维护/修补何时开始、将恢复模式更改为简单模式或批量记录模式,以更快地加载更少的日志、根据需要暂停或启动引擎,并可以完全自定义 SQL Server 数据库引擎。You can choose when maintenance/patching will start, to change the recovery model to simple or bulk logged to enable faster load less log, to pause or start engine when needed, and you can fully customize the SQL Server database engine. 控制度的提高也意味着在管理虚拟机方面需要承担更大的责任。With this additional control comes with added responsibility to manage the virtual machines.

下表列出了这些选项之间的主要差别:The main differences between these options are listed in the following table:

VM 上的 SQL ServerSQL Server on VM SQL 数据库中的单一数据库/弹性池Single database / elastic pool in SQL Database
可以完全控制 SQL Server 引擎。You have full control over the SQL Server engine.
高达 99.95% 的可用性。Up to 99.95% 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 on-premises.
Azure VNet 中的专用 IP 地址。Private IP address within Azure VNet.
可将应用程序或服务部署到 SQL Server 所在的主机上。You have ability to deploy application or services on the host where SQL Server is placed.
提供最常用的 SQL Server 功能。The most commonly used SQL Server features are available.
保证 99.99% 的可用性。99.99% 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).
需要自行管理备份和修补程序。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)
可能难以从 SQL Server 迁移。Migration from SQL Server might be hard.
某些 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.
无法分配专用 IP 地址(可以使用防火墙规则限制访问)。Private IP address cannot be assigned (you can limit the access using firewall rules).

了解每个部署选项如何配合 Azure 数据平台一起运行,并在匹配适合业务要求的选项时获得帮助。Learn how each deployment option fits into the Azure data platform and get help matching the right option to your business requirements. 无论以节省成本为优先考虑,还是将精简管理视为第一要素,本文都会帮助你确定哪种方法能够满足你最重视的业务要求。Whether you prioritize cost savings or minimal administration ahead of everything else, this article can help you decide which approach delivers against the business requirements you care about most.

Azure 的 SQL 数据平台Azure's SQL data platform

在 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. Azure 数据平台利用 SQL Server 技术,使其可在跨本地物理计算机、私有云环境、第三方托管的私有云环境和公有云中使用。Azure'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 public cloud. 使用 Azure 虚拟机上的 SQL Server,可以通过本地和云托管部署的组合来满足独特的多样化业务需求,并同时在这些环境中使用相同的服务器产品、开发工具和专业知识组合。SQL Server on Azure virtual machines enables you to meet unique and diverse business needs through a combination of on-premises and cloud-hosted deployments, while using the same set of server products, development tools, and expertise across these environments.

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

如图所示,每个产品可根据你在基础结构(X 轴)中所拥有的管理级别,以及数据库级别合并与自动化(Y 轴)所达到的成本效益程度等特征进行分类。As seen in the diagram, each offering can be characterized by the level of administration you have over the infrastructure (on the X axis), and by the degree of cost efficiency achieved by database level consolidation and automation (on the Y axis).

设计应用程序时,可以使用四个基本选项来托管属于应用程序一部分的 SQL Server:When designing an application, four basic options are available for hosting the SQL Server part of the application:

  • 非虚拟化物理机上的 SQL ServerSQL Server on non-virtualized physical machines
  • 本地虚拟机中的 SQL Server(私有云)SQL Server in on-premises virtualized machines (private cloud)
  • Azure 虚拟机中的 SQL Server(Azure 公有云)SQL Server in Azure Virtual Machine (Azure public cloud)
  • Azure SQL 数据库(Azure 公有云)Azure SQL Database (Azure public cloud)

在以下各部分中,你将了解 Azure 公有云中的 SQL Server:Azure SQL 数据库和 Azure VM 上的 SQL Server。In the following sections, you learn about SQL Server in the Azure public cloud: Azure SQL Database and SQL Server on Azure VMs. 此外,将探讨常见的业务动机,判断哪一个选项最适合应用程序。In addition, you explore common business motivators for determining which option works best for your application.

Azure SQL 数据库和 Azure VM 中的 SQL Server 详述A closer look at Azure SQL Database and SQL Server on Azure VMs

通常,这两个 SQL 选项已针对不同的用途进行了优化:In general, these two SQL options are optimized for different purposes:

  • Azure SQL 数据库Azure SQL Database

经过优化,可将预配和管理许多数据库的整体管理成本降到最低。Optimized to reduce overall management costs to the minimum for provisioning and managing many databases. 由于无需管理任何虚拟机、操作系统或数据库软件,因此可以持续降低管理成本。It reduces ongoing administration costs because 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. 一般而言,Azure SQL 数据库可以大幅增加由单个 IT 或开发资源管理的数据库数目。In general, Azure SQL Database 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.

  • Azure VM 上运行的 SQL ServerSQL Server running on Azure VMs

已针对将现有应用程序迁移到 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. 有了 Azure VM 上的 SQL server,即拥有了专用 SQL Server 实例和基于云的 VM 的完全管理权限。With SQL Server on Azure VMs, 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.

下表汇总了 SQL 数据库和 Azure VM 中 SQL Server 的主要特征:The following table summarizes the main characteristics of SQL Database and SQL Server on Azure VMs:

SQL 数据库中的单一数据库和弹性池SQL Database single databases and elastic pools 采用 SQL Server 的 Azure 虚拟机Azure virtual machines with SQL Server
最适用于:Best for: 需要使用最新的 SQL Server 稳定功能,且开发与面市时间有限的新云式设计应用程序。New cloud-designed applications that want to use the latest stable SQL Server features and have time constraints in development and marketing. 需要快速迁移到云中且只需进行极少量更改甚至不需要任何更改的现有应用程序。Existing applications that require fast migration to the cloud with minimal changes or no changes. 想要快速完成开发和测试方案,但又不想购买本地 SQL Server 非生产硬件。Rapid development and test scenarios when you do not want to buy on-premises non-production SQL Server hardware.
需要内置高可用性、灾难恢复和数据库升级的团队。Teams that need built-in high availability, disaster recovery, and upgrade for the database. 可为 SQL Server 配置、微调、自定义和管理高可用性、灾难恢复与修补的团队。Teams that can configure, fine tune, customize, and manage high availability, disaster recovery, and patching for SQL Server. 提供的某些自动化功能大大简化了这些任务。Some provided automated features dramatically simplify this.
不想要管理基础操作系统和配置设置的团队。Teams that do not want to manage the underlying operating system and configuration settings. 需要一个具有完全管理权限的自定义环境。You need a customized environment with full administrative rights.
最多 100 TB 的数据库。Databases of up to 100 TB. 具有高达 64 TB 存储空间的 SQL Server 实例。SQL Server instances with up to 64 TB of storage. 实例可以支持所需数量的数据库。The instance can support as many databases as needed.
兼容性Compatibility 支持大多数本地数据库级功能。Supports most on-premises database-level capabilities. 支持所有本地功能。Supports all on-premises capabilities.
资源:Resources: 不想使用 IT 资源来配置和管理底层基础结构,而是重点关注应用层。You do not want to employ IT resources for configuration and management of the underlying infrastructure but want to focus on the application layer. 可将某些 IT 资源用于配置和管理。You have some IT resources for configuration and management. 提供的某些自动化功能大大简化了这些任务。Some provided automated features dramatically simplify this.
总拥有成本:Total cost of ownership: 消除硬件成本并减少管理成本。Eliminates hardware costs and reduces administrative costs. 消除硬件成本。Eliminates hardware costs.
业务连续性:Business continuity: 内置容错基础结构功能以外,Azure SQL 数据库还提供自动备份时间点还原异地还原活动异地复制自动故障转移组等功能来提高业务连续性。In addition to built-in fault tolerance infrastructure capabilities, Azure SQL Database provides features, such as automated backups, Point-In-Time Restore, geo-restore, Active geo-replication, and Auto-failover groups to increase business continuity. 有关详细信息,请参阅 SQL 数据库业务连续性概述For more information, see SQL Database business continuity overview. Azure VM 上的 SQL Server 允许设置高可用性和灾难恢复解决方案,以满足数据库的具体需求。SQL Server on Azure VMs lets you set up a high availability and disaster recovery solution for your database’s specific needs. 因此,可以构建针对应用程序高度优化的系统。Therefore, you can have a system that is highly optimized for your application. 可以按需求自行测试并运行故障转移。You can test and run failovers by yourself when needed. 有关详细信息,请参阅 《High Availability and Disaster Recovery for SQL Server on Azure Virtual Machines》(Azure 虚拟机中 SQL Server 的高可用性和灾难恢复)。For more information, see High Availability and Disaster Recovery for SQL Server on Azure Virtual Machines.
混合云:Hybrid cloud: 本地应用程序可以访问 Azure SQL 数据库中的数据。Your on-premises application can access data in Azure SQL Database. 借助 Azure VN 上的 SQL Server,应用程序可以一部分在云中运行,一部分在本地运行。With SQL Server on Azure VMs, 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.
作为订阅服务器支持使用 SQL Server 事务复制来复制数据。Supports SQL Server transactional replication as a subscriber to replicate data. 完全支持使用 SQL Server 事务复制Always On 可用性组、集成服务和日志传送来复制数据。Fully supports SQL Server transactional replication, Always On Availability Groups, Integration Services, and Log Shipping to replicate data. 此外,完全支持传统的 SQL Server 备份Also, traditional SQL Server backups are fully supported

选择 Azure SQL 数据库或 Azure VM 上的 SQL Server 时的业务动机Business motivations for choosing Azure SQL Database or SQL Server on Azure VMs

有多个因素可能会影响你决定选择 PaaS 或 IaaS 来托管 SQL 数据库:There are several factors that can influence your decision to choose PaaS or IaaS to host your SQL databases:

  • 成本 - PaaS 和 IaaS 选项都包括基本价格,其中涵盖了底层基础结构和许可证的费用。Cost - Both PaaS and IaaS option include base price that cover 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 are getting these administration features included in the price. 选择 IaaS 选项可以在不使用资源时将其关闭,以降低成本;对于 PaaS 版本,除非你删除资源,然后在需要时重新创建资源,否则它会一直运行。IaaS option enables you to shut-down your resources while you are not using them to decrease the cost, while PaaS version is always running unless if 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.
  • 服务级别协议 - 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. 在极端情况下,若要实施与 PaaS 相当的高可用性解决方案,可能需要在 VM 中创建附加的 SQL Server 并配置 AlwaysOn 可用性组,而这可能会数据库成本翻倍。In the extreme case, if you want to implement High-availability solution that is matching PaaS, you might need to create additional SQL Server in VM and configure AlwaysOn Availability groups, which might double the cost of your database.
  • 迁移到 Azure 所需的时间 - Azure VM 中 SQL Server 与你的环境完全匹配,因此,从本地迁移到 Azure SQL VM,与在不同的本地服务器之间迁移数据库没有什么不同。Time to move to Azure - SQL Server in Azure VM is the exact match of your environment, so migration from on-premises to Azure SQL VM is not different than moving the databases from one on-premises server to another.

以下部分将更详细地讨论这些因素。These factors will be discussed in more details in the following sections.

成本Cost

无论你是现金不足的新公司,或是在预算有限的情况下运作的已成立公司的小组,资金的限制通常是决定数据库托管方式的主要考虑因素。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 中有关以下两个关系数据库选项的计费和许可基本概念:SQL 数据库和 Azure VM 中的 SQL Server。In this section, you learn about the billing and licensing basics in Azure with regards to these two relational database options: SQL Database and SQL Server on Azure VMs. 此外,还介绍如何计算应用程序总成本。You also learn about calculating the total application cost.

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

目前,SQL 数据库以服务的形式出售,提供了多个部署选项和多个服务层,根据资源采用不同的价格,所有资源根据所选的服务层和计算大小,以固定费率向你收取每小时费用。Currently, SQL Database is sold as a service and is available with several deployment 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. 有关当前支持的服务层、计算大小和存储量的最新信息,请参阅基于 DTU 的购买模型基于 vCore 的购买模型For the latest information on the current supported service tiers, compute sizes, and storage amounts, see DTU-based purchasing model and vCore-based purchasing model.

  • 使用 SQL 数据库单一数据库时,可根据需求选择各种价格的服务层,基本层的价格为 32.33 元/月。With SQL Database single database, you can choose a service tier that fits your needs from a wide range of prices starting from 32.33 CNY/month for basic tier.
  • 你可以创建弹性池,在数据库实例之间共享资源,以降低成本和应对使用高峰期。You can create elastic pools to share resources among database instances to reduce costs and accommodate usage spikes.

此外,需要对固定的 数据传输速率的 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.

使用 Azure SQL 数据库,Azure 自动配置、修补和升级数据库软件,从而降低管理成本。With SQL Database, 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 Server 中,可以使用平台提供的 SQL Server 映像(附带许可证),也可以引入自己的 SQL Server 许可证。With SQL Server 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)和特别版(开发人员版、Express 版、Web 版、Standard 版、Enterprise 版)都可用。All the supported SQL Server versions (2008R2, 2012, 2014, 2016) 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.

使用 Azure SQL 数据库时:When using Azure SQL Database:

  • 大幅降低管理成本Highly minimized administration costs
  • 已迁移的应用程序的有限开发成本Limited development costs for migrated applications
  • SQL 数据库服务成本SQL Database service costs
  • 无硬件购置成本No hardware purchasing costs

使用 Azure VM 上的 SQL Server 时:When using SQL Server on Azure VMs:

  • 更高的管理成本Higher administration costs
  • 已迁移的应用程序的有限开发成本,甚至没有成本Limited to no development costs for migrated applications
  • 虚拟机服务成本Virtual Machine service costs
  • 无硬件购置成本No hardware purchasing costs

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

管理Administration

对许多企业来说,决定过渡到到云服务的关键在于降低管理复杂度。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.

  • 使用 Azure SQL 数据库,可以继续管理数据库,但不再需要管理数据库引擎、操作系统或硬件。With Azure SQL Database, 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 Server,可以完全掌控操作系统和 SQL Server 实例配置。With SQL Server on Azure VMs, 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.

对于 SQL 数据库,Azure 提供 99.99% 的可用性 SLA。For SQL Database, Azure provides an availability SLA of 99.99%. 有关最新信息,请参阅服务级别协议For the latest information, see Service Level Agreement.

对于 Azure VM 上运行的 SQL Server,Azure 提供 99.95% 的可用性 SLA(仅涵盖虚拟机)。For SQL Server running on Azure VMs, Azure 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 中配置一个受支持的高可用性选项,例如 AlwaysOn 可用性组For database high availability (HA) within VMs, you should configure one of the supported high availability options in SQL Server, such as AlwaysOn 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

当开发人员工作效率和新解决方案的快速面市时间至关重要时,SQL 数据库单一数据库或弹性池是云设计应用程序的理想解决方案。SQL Database single databases or elastic pools are 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.

如果现有或新的应用程序需要大型数据库或者访问 SQL Server 或 Windows/Linux 中的所有功能,并且想要避免购置新本地硬件所要花费的时间和费用,则 Azure VM 上运行的 SQL Server 是理想的选择。SQL Server running on Azure VMs 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,则它也是一个不错的选择。It is also a good fit when you want to migrate existing on-premises applications and databases to Azure as-is. 由于无需更改表示层、应用层和数据层,所以在重新构建现有解决方案时可以节省时间和预算。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.

后续步骤Next steps