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

在 Azure SQL 中选择正确的部署选项Choose the right deployment option in Azure SQL

了解每个部署选项如何适应 Microsoft 的 Azure SQL 数据平台,并获得与正确选项匹配的帮助以满足你的业务要求。Learn how each deployment option fits into Microsoft's Azure SQL data platform, and get help matching 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.

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

从迁移到现有应用程序的现代化,到构建现代云服务,Azure SQL 是一种新式 SQL 平台,它提供多种部署选项,由业界领先的 Microsoft SQL Server 引擎提供支持。From lift-and-shift migrations, to modernization of existing applications, to building modern cloud services, Azure SQL is a modern SQL platform that offers several deployment options, powered by an industry leading Microsoft SQL Server engine. Azure SQL 旨在支持多种应用程序模式,这些模式具有对底层平台的不同控制级别,以满足最苛刻的迁移和现代化要求。Azure SQL is designed to support a wide variety of application patterns with different levels of control over the underlying platform to meet the most demanding migration and modernization requirements. Azure SQL 消除了单一统一的管理体验,从而消除了以大规模方式管理基于 SQL Server 的各种应用程序的复杂性。Azure SQL eliminates the complexity of managing diverse collections of SQL Server-based applications at scale by providing a single, unified management experience.

在 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. 使用 Azure 虚拟机(SQL 虚拟机)上的 SQL Server,你可以通过本地和云托管部署的组合来满足独特的多样化业务需求,同时使用相同的服务器产品、开发工具和专业知识集在这些环境中。SQL Server on Azure virtual machines (SQL 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 数据库。

如图中所示,每个产品可按您对基础结构的管理级别,以及成本效率的程度来表征。As seen in the diagram, each 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 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, and take backups, or do you want to delegate these operations to Azure?

根据具体的答案,可以选择以下选项:Depending on the answer, you have the following options:

  • SQL 数据库:最适用于想要使用最新稳定 SQL Server 功能,并在开发和营销中具有时间限制的新式云应用程序。SQL databases: Best for modern cloud applications that want to use the latest stable SQL Server features and have time constraints in development and marketing. 完全托管的 SQL 数据库引擎,基于最新稳定的 SQL Server Enterprise Edition。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 数据库有多个部署选项,每个选项都以 Microsoft 所拥有、托管及维护的标准化硬件和软件为基础。SQL database has multiple deployment options, each of which is 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 require 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.

    数据库提供以下部署选项:Databases offer the following deployment options:

    • 作为具有一组通过数据库服务器管理的资源的单一数据库As a single database with its own set of resources managed via a database 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.
    • 弹性池,它是具有通过数据库服务器管理的共享资源集的数据库的集合。An elastic pool, which is a collection of databases with a shared set of resources managed via a 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 pattern. 弹性池提供了一个经济高效的解决方案,用于管理具有可变使用模式的多个数据库的性能。Elastic pools provide a cost-effective solution for managing the performance of multiple databases that have variable usage patterns.
    • 用于管理单个数据库和弹性池的组的数据库服务器A database server, which is used to manage groups of single databases and elastic pools. 数据库服务器充当多个单一或共用数据库的中心管理点,登录名防火墙规则审核规则威胁检测策略故障转移组Database servers act as a central administrative point for multiple single or pooled databases, logins, firewall rules, auditing rules, threat detection policies, and failover groups.
  • SQL 托管实例:最适用于大多数到云的迁移。SQL managed instances: Best for most migrations to the cloud. 托管实例是具有一组共享资源的系统和用户数据库的集合,这些资源是一组可以直接迁移的资源。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. 托管实例类似于为数据库提供共享资源的Microsoft SQL Server 数据库引擎的实例和其他实例范围的功能。A managed instance is similar to an instance of the Microsoft SQL Server database engine offering shared resources for databases and additional instance-scoped features. 托管实例支持从本地迁移数据库,只要求对数据库进行极少量的更改,甚至根本不需要更改。Managed instance supports database migration from on-premises with minimal to no database change. 此选项提供 Azure SQL 数据库的所有 PaaS 优势,但同时也添加了以前只在 SQL VM 中提供的功能。This option provides all of the PaaS benefits of Azure SQL Database but adds capabilities that were previously only available in SQL VMs. 这包括本机虚拟网络 (VNet),以及与本地 SQL Server 的接近 100% 的兼容性。This includes a native virtual network (VNet) and near 100% compatibility with on-premises SQL Server. 托管实例提供完全 SQL Server 访问和功能兼容性,以便将 SQL Server 迁移到 Azure。Managed instances provide full SQL Server access and feature compatibility for migrating SQL Servers to Azure.

  • SQL 虚拟机:最适合需要 OS 级别访问的迁移和应用程序。SQL virtual machines: Best for migrations and applications requiring OS-level access. 对于需要快速迁移到云的现有应用程序,SQL 虚拟机是无变化或无更改。SQL virtual machines 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 实例和基础操作系统提供完全的管理控制。SQL virtual machines offer full administrative control over the SQL Server instance and underlying OS for migration to Azure. 想要快速完成开发和测试方案,但又不想购买本地 SQL Server 非生产硬件。Rapid development and test scenarios when you do not want to buy on-premises non-production SQL Server hardware. SQL 虚拟机属于行业类别的基础结构即服务(IaaS) ,可让你在 Azure 云中完全托管的虚拟机(VM)中运行 SQL Server。SQL virtual machines fall into the industry category Infrastructure-as-a-Service (IaaS) and allows you to run SQL Server inside a fully-managed virtual machine (VM) in the Azure cloud. 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. 在云中安装并托管 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 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 托管实例的最大差别在于,SQL Server Vm 允许完全控制数据库引擎。The most significant difference from SQL databases and SQL managed instances, is that SQL Server VMs allow 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.

    已针对将现有应用程序迁移到 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.

下表中列出了其他差别,但数据库和托管实例已进行了优化,以减少设置和管理多个数据库所需的总管理成本。Additional differences are listed in the following table, but both databases and managed instances are 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. 托管实例支持面向实例的功能,可用于轻松迁移现有应用程序,以及在数据库之间共享资源。Managed instance provides support for instance-scoped features enabling easy migration of existing applications, as well as sharing resources amongst databases.

SQL 数据库SQL databases SQL 托管实例SQL managed instances SQL 虚拟机SQL virtual machines
支持大多数本地数据库级功能。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 on-premises.
保证 99.99% 的可用性。99.99% availability guaranteed.
内置备份、修补和恢复。Built-in backups, patching, recovery.
最新稳定的数据库引擎版本。Latest stable Database Engine version.
从 SQL Server 轻松迁移。Easy migration from SQL Server.
Azure VNet 中的专用 IP 地址。Private IP address within Azure VNet.
内置高级智能和安全性。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 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 迁移。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).
仍有极少量的 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. SQL Server 实例,最高可达 256 TB 的存储空间。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.

用于选择数据库、托管实例或 SQL 虚拟机的业务动机Business motivations for choosing databases, managed instances, or SQL virtual machines

有几个因素可能会影响你在不同数据产品之间进行选择的决策: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 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. 例如,单一数据库或共用数据库不支持 CLR,但托管实例支持 CLR。For example, the CLR is not supported with single or pooled databases, but is supported for a 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. 可以通过在 VM 中创建其他 SQL Server 并配置 AlwaysOn 可用性组,在 99.99% 实现高可用性解决方案。You can implement High-availability solution at 99.99% by creating an additional SQL Server in VM and configure AlwaysOn Availability groups.
  • 迁移到 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. 托管实例还可以实现极其轻松的迁移;但是,在迁移到托管实例之前,可能需要应用某些更改。Managed instance also enables extremely easy migration; however, there might be some changes that you need to apply before you migrate to a managed instance.

以下部分将更详细地讨论这些因素。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 数据库和 SQL 虚拟机。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 virtual machines. 还将了解如何计算应用程序总成本。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 数据库,你可以从从 5 $/月 for basic 层开始,选择满足你的需求的服务层。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.
  • 你可以创建弹性池,在数据库实例之间共享资源,以降低成本和应对使用高峰期。You can create elastic pools to share resources among database instances 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 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 托管实例,Microsoft 自动配置、修补和升级数据库软件,从而降低管理成本。With SQL databases and SQL managed instances, the database software is automatically configured, patched, and upgraded by Microsoft, 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.

使用SQL 虚拟机,你可以使用平台提供的任何 SQL Server 映像(包括许可证)或引入你的 SQL Server 许可证。With SQL virtual machines, 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.

有关定价的详细信息,请参阅以下资源: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. Microsoft 使用 IaaS 和 PaaS 管理底层基础结构和自动复制所有数据以提供灾难恢复,配置及升级数据库软件,管理负载均衡,并在数据中心发生服务器故障时执行透明的故障转移。With IaaS and PaaS, Microsoft 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 databases and SQL managed instances, 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.
  • 使用SQL 虚拟机,你可以完全控制操作系统和 SQL Server 实例配置。With SQL virtual machines, 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 数据库,Microsoft 提供 99.99% 的可用性 SLA。For SQL Database, Microsoft provides an availability SLA of 99.99%. 有关最新信息,请参阅 服务级别协议For the latest information, see Service Level Agreement.

对于SQL 虚拟机,Microsoft 提供 99.95% 的可用性 SLA,只涉及虚拟机。For SQL virtual machines, 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

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 托管实例大大简化了将现有应用程序迁移到 azure SQL 的速度,使你能够在 azure 中快速将迁移的数据库应用程序推向市场。SQL managed instance greatly simplifies the migration of existing applications to Azure SQL, enabling you to bring migrated database applications to market in Azure quickly.

如果现有的或新的应用程序需要大型数据库或访问 SQL Server 或 Windows/Linux 中的所有功能,并且想要避免获取新的本地硬件的时间和开销,则SQL 虚拟机是理想的。SQL virtual machines are 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,而 Azure 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 Azure SQL Database 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 "。To access the Azure SQL resources page, select Azure SQL in the left-hand menu of the Azure portal. 如果AZURE sql不在列表中, 请选择 "所有服务", 然后在搜索框中键入 " Azure sql "。If Azure SQL is not in the list, select All services, then type Azure SQL in the search box.

备注

AZURE sql提供一种便捷的方式来访问所有 SQL 数据库、弹性池、数据库服务器、sql 托管实例和 sql 虚拟机。Azure SQL provides a quick and easy way to access all of your SQL databases, elastic pools, database servers, SQL managed instances, and SQL virtual machines. Azure SQL 不是服务或资源。Azure SQL is not a service or resource.

若要管理现有资源, 请在列表中选择所需的项。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