什么是 Azure SQL 数据库服务?What is the Azure SQL Database service?

Azure SQL 数据库是通用的关系数据库,以托管服务的形式提供。Azure SQL Database is a general-purpose relational database, provided as a managed service. 使用它可为 Azure 中的应用程序和解决方案创建高可用性和高性能数据存储层。With it, you can create a highly available and high-performance data storage layer for the applications and solutions in Azure. SQL 数据库可成为各种新式云应用程序的正确选择,因为它可让你处理关系数据和非关系结构(例如图形、JSON、空间和 XML)。SQL Database can be the right choice for a variety of modern cloud applications because it enables you to process both relational data and non-relational structures, such as graphs, JSON, spatial, and XML.

SQL 数据库基于 Microsoft SQL Server 数据库引擎的最新稳定版本。It's based on the latest stable version of the Microsoft SQL Server database engine. 你可以使用高级查询处理功能集,例如高性能内存中技术智能查询处理You can use advanced query processing features, such as high-performance in-memory technologies and intelligent query processing. 事实上,SQL Server 的最新功能会先发布到 SQL 数据库,然后再发布到 SQL Server 本身。In fact, the newest capabilities of SQL Server are released first to SQL Database, and then to SQL Server itself. 无需投入任何修补或升级开销,即可获得 SQL Server 的最新功能,这些功能已在数百万个数据库中进行测试。You get the newest SQL Server capabilities with no overhead for patching or upgrading, tested across millions of databases.

使用 SQL 数据库可在两个不同的购买模型中轻松定义和缩放性能:基于 vCore 的购买模型基于 DTU 的购买模型SQL Database enables you to easily define and scale performance within two different purchasing models: a vCore-based purchasing model and a DTU-based purchasing model. SQL 数据库是完全托管型服务,提供内置的可用性、备份和其他常见维护操作。SQL Database is a fully managed service that has built-in high availability, backups, and other common maintenance operations. Azure 可以处理 SQL 和操作系统代码的所有修补与更新。Azure handles all patching and updating of the SQL and operating system code. 你无需管理底层基础结构。You don't have to manage the underlying infrastructure.

备注

有关术语及其定义,请参阅 SQL 数据库术语词汇表For relevant terms and their definitions, see the SQL Database terms glossary.

部署模型Deployment models

Azure SQL 数据库提供下述适用于 Azure SQL 数据库的部署选项:Azure SQL Database provides the following deployment options for an Azure SQL database:

部署选项示意图

  • 单一数据库表示完全托管的独立数据库。Single database represents a fully managed, isolated database. 对于需要单个可靠数据源的新式云应用程序和微服务,可以使用此选项。You might use this option if you have modern cloud applications and microservices that need a single reliable data source. 单一数据库类似于 Microsoft SQL Server 数据库引擎包含的数据库A single database is similar to a contained database in Microsoft SQL Server Database Engine.
  • 托管实例Microsoft SQL Server 数据库引擎的完全托管型实例。Managed instance is a fully managed instance of the Microsoft SQL Server Database Engine. 其中包含一组可结合使用的数据库。It contains a set of databases that can be used together. 若要轻松将本地 SQL Server 数据库迁移到 Azure 云,或者对于需要使用 SQL Server 数据库引擎提供的数据库功能的应用程序,可以使用此选项。Use this option for easy migration of on-premises SQL Server databases to the Azure cloud, and for applications that need to use the database features that SQL Server Database Engine provides.
  • 弹性池单一数据库的集合,其中包含一组共享的资源(例如 CPU 或内存)。Elastic pool is a collection of single databases with a shared set of resources, such as CPU or memory. 可以将单一数据库移入或移出弹性池。Single databases can be moved into and out of an elastic pool.

重要

若要了解 SQL 数据库与 SQL Server 的功能差异,以及不同 Azure SQL 数据库部署选项的区别,请参阅 SQL 数据库功能To understand the feature differences between SQL Database and SQL Server, as well as the differences among different Azure SQL Database deployment options, see SQL Database features.

SQL 数据库通过多个资源类型、服务层级和计算大小提供可预测的性能。SQL Database delivers predictable performance with multiple resource types, service tiers, and compute sizes. 它提供无需停机的动态可伸缩性、内置智能优化、全局可伸缩性和可用性,以及高级安全选项。It provides dynamic scalability with no downtime, built-in intelligent optimization, global scalability and availability, and advanced security options. 凭借这些功能,你可将注意力集中在如何快速进行应用开发和加快推向市场方面,而无需管理虚拟机和基础结构。These capabilities allow you to focus on rapid app development and accelerating your time-to-market, rather than on managing virtual machines and infrastructure. SQL 数据库服务目前在世界各地有 38 个数据中心,因此你可以在附近的数据中心运行数据库。The SQL Database service is currently in 38 datacenters around the world, so you can run your database in a datacenter near you.

可缩放的性能和池Scalable performance and pools

可以定义分配的资源量。You can define the amount of resources assigned.

  • 使用单一数据库,每个数据库相互隔离且可移植。With single databases, each database is isolated from others and is portable. 每个数据库都有自身有保证的计算、内存和存储资源量。Each has its own guaranteed amount of compute, memory, and storage resources. 分配给数据库的资源量专门用于该数据库,而不会与 Azure 中的其他数据库共享。The amount of the resources assigned to the database is dedicated to that database, and isn't shared with other databases in Azure. 可以动态扩展和缩减单一数据库资源You can dynamically scale single database resources up and down. 单一数据库提供不同的计算、内存和存储资源来满足不同的需求。The single database option provides different compute, memory, and storage resources for different needs. 例如,你可以获得 1 到 80 个 vCore,或 32 GB 到 4 TB 的存储。For example, you can get 1 to 80 vCores, or 32 GB to 4 TB. 借助单一数据库的“超大规模”服务层级,可以通过快速备份和还原功能扩展到 100TB。The hyperscale service tier for single database enables you to scale to 100 TB, with fast backup and restore capabilities.
  • 使用弹性池可以分配池中所有数据库共享的资源。With elastic pools, you can assign resources that are shared by all databases in the pool. 可以新建数据库,或者将现有单一数据库移到资源池中,以最大限度地使用资源和节省资金。You can create a new database, or move the existing single databases into a resource pool to maximize the use of resources and save money. 此选项还可让你动态扩展和缩减弹性池资源This option also gives you the ability to dynamically scale elastic pool resources up and down.
  • 使用托管实例,每个托管实例都与其他实例隔离开来,并包含有保证的资源。With managed instances, each managed instance is isolated from other instances with guaranteed resources. 在托管实例中,实例数据库共享一组资源。Within a managed instance, the instance databases share a set of resources. 可以动态纵向扩展和缩减托管实例资源You can dynamically scale managed instance resources up and down.

可以在小型单一数据库中构建第一个应用,每个月只需在常规用途服务层级中花费少量资金。You can build your first app on a small, single database at a low cost per month in the general-purpose service tier. 然后可以根据解决方案的需要,随时手动或以编程方式将服务层级更改为业务关键服务层级。You can then change its service tier manually or programmatically at any time to the business-critical service tier, to meet the needs of your solution. 可在不给应用或客户造成停机的情况下调整性能。You can adjust performance without downtime to your app or to your customers. 动态可伸缩性使得数据库能够以透明方式对不断变化的资源需求做出响应。Dynamic scalability enables your database to transparently respond to rapidly changing resource requirements. 只需在需要资源时为需要的资源付费。You pay for only the resources that you need when you need them.

动态可伸缩性不同于自动缩放。 Dynamic scalability is different from autoscale. 自动缩放是指服务根据条件自动缩放,而动态可伸缩性允许在无停机时间的情况下进行手动缩放。Autoscale is when a service scales automatically based on criteria, whereas dynamic scalability allows for manual scaling without downtime. 单一数据库选项支持手动动态可伸缩性,但不支持自动缩放。The single database option supports manual dynamic scalability, but not autoscale. 若要获得更多自动体验,请考虑使用弹性池,它允许数据库根据各个数据库需求共享池中的资源。For a more automatic experience, consider using elastic pools, which allow databases to share resources in a pool based on individual database needs. 另一个选项是使用脚本来帮助自动执行单一数据库的可伸缩性。Another option is to use scripts that can help automate scalability for a single database. 有关示例,请参阅使用 PowerShell 监视和缩放单个数据库For an example, see Use PowerShell to monitor and scale a single database.

购买模型Purchasing models

SQL 数据库提供以下购买模型:SQL Database offers the following purchasing models:

  • 基于 vCore 的购买模型允许选择 vCore 数、内存容量,以及存储的容量和速度。The vCore-based purchasing model lets you choose the number of vCores, the amount of memory, and the amount and speed of storage. 基于 vCore 的购买模型还允许使用适用于 SQL Server 的 Azure 混合权益来节省成本。The vCore-based purchasing model also allows you to use Azure Hybrid Benefit for SQL Server to gain cost savings. 有关 Azure 混合权益的详细信息,请参阅本文稍后的“常见问题解答”部分。For more information about the Azure Hybrid Benefit, see the "Frequently asked questions" section later in this article.
  • 基于 DTU 的购买模型在以下三个服务层级中提供包括计算、内存和 I/O 资源在内的各种内容,以支持轻型到重型数据库工作负荷。The DTU-based purchasing model offers a blend of compute, memory, and I/O resources in three service tiers, to support light to heavy database workloads. 每个层级中的不同计算大小提供这些资源的不同组合,你可以向其添加更多的存储资源。Compute sizes within each tier provide a different mix of these resources, to which you can add additional storage resources.
  • 无服务器模型可根据工作负荷需求自动缩放计算,并按每秒使用的计算量计费。The serverless model automatically scales compute based on workload demand, and bills for the amount of compute used per second. 此外,当仅对存储计费时,无服务器计算层将在非活动期间自动暂停数据库;当活动返回时,它将自动恢复数据库。The serverless compute tier also automatically pauses databases during inactive periods when only storage is billed, and automatically resumes databases when activity returns.

服务层Service tiers

Azure SQL 数据库提供了三个专为不同类型的应用程序设计的服务层级:Azure SQL Database offers three service tiers that are designed for different types of applications:

  • 常规用途/标准服务层级设计用于常见工作负荷。General Purpose/Standard service tier designed for common workloads. 它提供以预算导向的、均衡的计算和存储选项。It offers budget-oriented balanced compute and storage options.
  • 业务关键型/高级服务层级专为事务率较高、I/O 延迟最低的 OLTP 应用程序而设计。Business Critical/Premium service tier designed for OLTP applications with high transaction rate and lowest-latency I/O. 它使用多个独立副本,提供最高级别的故障恢复能力。It offers the highest resilience to failures by using several isolated replicas.
  • 超大规模服务层级专为超大型 OLTP 数据库设计,能够自动缩放存储和流畅地缩放计算。Hyperscale service tier designed for very large OLTP database and the ability to auto-scale storage and scale compute fluidly.

弹性池可以最大化资源利用率Elastic pools to maximize resource utilization

许多业务和应用程序只要能够创建单一数据库并按需调高或调低性能即可,尤其是当使用模式相对容易预测时。For many businesses and applications, being able to create single databases and dial performance up or down on demand is enough, especially if usage patterns are relatively predictable. 无法预测的使用模式可能会使成本管理和业务模式变得困难。Unpredictable usage patterns can make it hard to manage costs and your business model. 弹性池旨在解决此问题。Elastic pools are designed to solve this problem. 可以向池而不是单个数据库分配性能资源。You allocate performance resources to a pool rather than an individual database. 只需为池的总体性能资源付费,而无需为单一数据库性能付费。You pay for the collective performance resources of the pool rather than for single database performance.

显示基本、标准和高级版中的弹性池的图形

使用弹性池时,不需要在资源需求波动时担心如何上下调节数据库性能。With elastic pools, you don't need to focus on dialing database performance up and down as demand for resources fluctuates. 共用数据库可根据需要使用弹性池的性能资源。The pooled databases consume the performance resources of the elastic pool as needed. 共用数据库会使用该池,但不会超出其限制,因此即使单个数据库的使用情况仍不可预测,成本也仍是可预测的。Pooled databases consume but don't exceed the limits of the pool, so your cost remains predictable even if individual database usage doesn't.

可以向池添加和删除数据库,将应用从少量数据库扩展到数千个,而一切费用不会超出所控制的预算范围。You can add and remove databases to the pool, scaling your app from a handful of databases to thousands, all within a budget that you control. 还可以控制池中数据库可用的资源量上限与下限,确保池中不会有任何数据库使用所有的池资源,每个共用数据库的可用资源量都有最低保障。You can also control the minimum and maximum resources available to databases in the pool, to ensure that no database in the pool uses all the pool resources, and that every pooled database has a guaranteed minimum amount of resources.

脚本可以帮助监视和缩放弹性池。Scripts can help with monitoring and scaling elastic pools. 有关示例,请参阅使用 PowerShell 在 Azure SQL 数据库中监视和缩放 SQL 弹性池For an example, see Use PowerShell to monitor and scale a SQL elastic pool in Azure SQL Database.

重要

托管实例不支持弹性池。A managed instance doesn't support elastic pools. 相反,托管实例是共用托管实例资源的实例数据库的集合。Rather, a managed instance is a collection of instance databases that share managed instance resources.

将单一数据库与共用数据库混合使用Blend single databases with pooled databases

可将单一数据库与弹性池混合使用,并更改单一数据库和弹性池的服务层级来适应自己的情况。You can blend single databases with elastic pools, and change the service tiers of single databases and elastic pools to adapt to your situation. 还可将其他 Azure 服务与 SQL 数据库搭配使用以满足独特的应用设计需求,提高成本和资源效益,发掘新的商机。You can also mix and match other Azure services with SQL Database to meet your unique app design needs, drive cost and resource efficiencies, and unlock new business opportunities.

集中监视和警报功能Extensive monitoring and alerting capabilities

Azure SQL 数据库提供高级监视和故障排除功能,可帮助你更深入了解工作负荷的特征。Azure SQL Database provides advanced monitoring and troubleshooting features that help you get deeper insights into workload characteristics. 这些功能和工具包括:These features and tools include:

  • 最新版本的 SQL Server 数据库引擎提供的内置监视功能。The built-in monitoring capabilities provided by the latest version of SQL Server Database Engine. 它们可让你找到实时性能见解。They enable you to find real-time performance insights.
  • Azure 提供的 PaaS 监视功能,可让你监视大量的数据库实例并对其进行故障排除。PaaS monitoring capabilities provided by Azure that enable you to monitor and troubleshoot a large number of database instances.

查询存储 - 内置的 SQL Server 监视功能,它可以实时记录查询性能,并使你能够识别潜在的性能问题和排名靠前的资源使用者。Query Store, a built-in SQL Server monitoring feature, records the performance of your queries in real time, and enables you to identify the potential performance issues and the top resource consumers. 自动优化和建议提供有关性能退化以及存在缺失或重复索引的查询的建议。Automatic tuning and recommendations provide advice regarding the queries with the regressed performance and missing or duplicated indexes. 使用 Azure SQL 数据库中的自动优化可以手动应用脚本来解决问题,或者让 Azure SQL 数据库应用修复措施。Automatic tuning in SQL Database enables you to either manually apply the scripts that can fix the issues, or let SQL Database apply the fix. SQL 数据库还可以测试并验证该修复措施是否起了作用,并根据结果保留或还原更改。SQL Database can also test and verify that the fix provides some benefit, and retain or revert the change depending on the outcome. 除了查询存储和自动优化功能外,还可以使用标准的 DMV 和 XEvent 来监视工作负荷性能。In addition to Query Store and automatic tuning capabilities, you can use standard DMVs and XEvent to monitor the workload performance.

Azure 提供内置的性能监视警报工具,将它们与性能评分相结合,可以监视数千个数据库的状态。Azure provides built-in performance monitoring and alerting tools, combined with performance ratings, that enable you to monitor the status of thousands of databases. 使用这些工具,可以根据当前的或预计的性能需求,快速评估纵向扩展或纵向缩减产生的影响。Using these tools, you can quickly assess the impact of scaling up or down, based on your current or projected performance needs. 此外,SQL 数据库可发出指标和诊断日志,以便更轻松地监视。Additionally, SQL Database can emit metrics and diagnostic logs for easier monitoring. 可配置 SQL 数据库,将资源使用情况、辅助角色和会话以及连接性存储到以下 Azure 资源之一:You can configure SQL Database to store resource usage, workers and sessions, and connectivity into one of these Azure resources:

  • Azure 存储:用于低价存档大量遥测数据。Azure Storage: For archiving vast amounts of telemetry for a small price.
  • Azure 事件中心:用于将 SQL 数据库遥测与自定义监视解决方案或热门管道集成。Azure Event Hubs: For integrating SQL Database telemetry with your custom monitoring solution or hot pipelines.
  • Azure Monitor 日志:用于具有报告、警报和缓解功能的内置监视解决方案。Azure Monitor logs: For a built-in monitoring solution with reporting, alerting, and mitigating capabilities.

Azure 监视体系结构示意图

可用性功能Availability capabilities

在传统的 SQL Server 环境中,通常需要在本地设置至少两台计算机。In a traditional SQL Server environment, you generally have at least two machines locally set up. 这些计算机包含确切数目的、以同步方式维护的数据副本,以便在单个计算机或组件出现故障时提供保护。These machines have exact, synchronously maintained, copies of the data to protect against a failure of a single machine or component. 此环境提供高可用性,但在发生损毁数据中心的自然灾难时无法提供保护。This environment provides high availability, but it doesn't protect against a natural disaster destroying your datacenter.

灾难恢复假设灾难性事件在局部地区发生,而远地部署了另一个包含数据副本的计算机或计算机组。Disaster recovery assumes that a catastrophic event is geographically localized enough to have another machine or set of machines with a copy of your data far away. 在 SQL Server 中,可以使用以异步模式运行的 Always On 可用性组来获取此功能。In SQL Server, you can use Always On Availability Groups running in async mode to get this capability. 人们通常不想等到远端复制完成后再提交事务,因此,在执行计划外故障转移时可能会丢失数据。People often don't want to wait for replication to happen that far away before committing a transaction, so there's potential for data loss when you do unplanned failovers.

高级和业务关键服务层级中的数据库的某些功能已经与可用性组的同步功能非常类似Databases in the premium and business critical service tiers already do something very similar to the synchronization of an availability group. 较低服务层级中的数据库使用不同但等效的机制通过存储提供冗余。Databases in lower service tiers provide redundancy through storage by using a different but equivalent mechanism. 内置逻辑可帮助防范单个计算机发生故障。Built-in logic helps protect against a single machine failure. 使用活动异地复制功能可以在灾难损毁整个区域时提供保护。The active geo-replication feature gives you the ability to protect against disaster where a whole region is destroyed.

事实上,Azure 的服务级别协议 (SLA)(由 Azure 管理的数据中心的全球网络提供支持)有助于保持应用全天候运行。In fact, the service level agreement (SLA) of Azure, powered by a global network of Azure-managed datacenters, helps keep your app running 24/7. Azure 平台完全管理每个数据库,并保证不会丢失数据并实现高百分比数据可用性。The Azure platform fully manages every database, and it guarantees no data loss and a high percentage of data availability. Azure 会自动处理修补、备份、复制、故障检测;基础的潜在硬件、软件或网络故障;部署 bug 修复、故障转移、数据库升级和其他维护任务。Azure automatically handles patching, backups, replication, failure detection, underlying potential hardware, software or network failures, deploying bug fixes, failovers, database upgrades, and other maintenance tasks. 标准可用性是通过将计算层与存储层相隔离来实现的。Standard availability is achieved by a separation of compute and storage layers. 高级可用性的实现方式是将计算和存储层集成到单个节点以提高性能,然后实施类似于 Always On 可用性组的技术。Premium availability is achieved by integrating compute and storage on a single node for performance, and then implementing technology similar to Always On Availability Groups. 有关 Azure SQL 数据库的高可用性功能的完整讨论,请参阅 SQL 数据库可用性For a full discussion of the high availability capabilities of Azure SQL Database, see SQL Database availability.

此外,SQL 数据库还提供内置业务连续性和全局可伸缩性功能。In addition, SQL Database provides built-in business continuity and global scalability features. 其中包括:These include:

  • 自动备份Automatic backups:

    SQL 数据库自动执行 SQL 数据库的完整备份、差异备份和事务日志备份,以便能够还原到任何时间点。SQL Database automatically performs full, differential, and transaction log backups of SQL databases to enable you to restore to any point in time. 对于单一数据库和共用数据库,可以将 SQL 数据库配置为,将完整数据库备份存储到 Azure 存储,以供长期备份保留。For single databases and pooled databases, you can configure SQL Database to store full database backups to Azure Storage for long-term backup retention. 对于托管实例,还可以执行仅复制备份,以供长期备份保留。For managed instances, you can also perform copy-only backups for long-term backup retention.

  • 时间点还原Point-in-time restores:

    所有 SQL 数据库部署选项都支持恢复到任何 SQL 数据库的自动备份保留期内的任何时间点。All SQL Database deployment options support recovery to any point in time within the automatic backup retention period for any SQL database.

  • 活动异地复制Active geo-replication:

    使用单一数据库和共用数据库选项,可以在同一或全球分布式 Azure 数据中心内配置至多 4 个可读辅助数据库。The single database and pooled databases options allow you to configure up to four readable secondary databases in either the same or globally distributed Azure datacenters. 例如,如果有一个 SaaS 应用程序,其中的目录数据库包含大量并发只读事务,请使用活动异地复制来启用全局读取缩放。For example, if you have a SaaS application with a catalog database that has a high volume of concurrent read-only transactions, use active geo-replication to enable global read scale. 这可以消除主数据库上因读取工作负荷产生的瓶颈。This removes bottlenecks on the primary that are due to read workloads. 对于托管实例,请使用自动故障转移组。For managed instances, use auto-failover groups.

  • 自动故障转移组Auto-failover groups:

    所有 SQL 数据库部署选项允许使用故障转移组实现全局规模的高可用性和负载均衡。All SQL Database deployment options allow you to use failover groups to enable high availability and load balancing at global scale. 这包括大量数据库、弹性池和托管实例的透明异地复制与故障转移。This includes transparent geo-replication and failover of large sets of databases, elastic pools, and managed instances. 使用故障转移组可以最小的管理开销创建全局分布式 SaaS 应用程序。Failover groups enable the creation of globally distributed SaaS applications, with minimal administration overhead. 这会将所有复杂的监视、路由和故障转移业务流程都留给 SQL 数据库来处理。This leaves all the complex monitoring, routing, and failover orchestration to SQL Database.

内置智能Built-in intelligence

使用 SQL 数据库,可获得内置智能,帮助大幅降低运行和管理数据库的成本,并将应用程序的性能和安全性最大化。With SQL Database, you get built-in intelligence that helps you dramatically reduce the costs of running and managing databases, and that maximizes both performance and security of your application. 通过全天候运行数以百万计的客户工作负荷,SQL 数据库收集和处理大量遥测数据,同时完全尊重客户的隐私。Running millions of customer workloads around the clock, SQL Database collects and processes a massive amount of telemetry data, while also fully respecting customer privacy. 各种算法正在不间断计算遥测数据,以便服务可以了解并适应应用程序。Various algorithms continuously evaluate the telemetry data so that the service can learn and adapt with your application.

自动性能监视和优化Automatic performance monitoring and tuning

SQL 数据库提供针对需要监视的查询的详细见解。SQL Database provides detailed insight into the queries that you need to monitor. SQL 数据库会学习用户的数据库模式,使用户能够根据工作负荷调整数据库架构。SQL Database learns about your database patterns, and enables you to adapt your database schema to your workload. SQL 数据库提供性能优化建议,可在其中查看并应用优化操作。SQL Database provides performance tuning recommendations, where you can review tuning actions and apply them.

然而,持续监视数据库是一项艰巨且乏味的任务,尤其是在处理多个数据库时。However, constantly monitoring a database is a hard and tedious task, especially when dealing with many databases. Intelligent Insights 通过大规模地自动监视 SQL 数据库性能来为你完成此作业。Intelligent Insights does this job for you by automatically monitoring SQL Database performance at scale. 它会在出现性能下降问题时发出通知,识别每个问题的根本原因,并在可能的情况下提供性能改进建议。It informs you of performance degradation issues, it identifies the root cause of each issue, and provides performance improvement recommendations when possible.

可能无法高效管理大量数据库,即使使用 SQL 数据库和 Azure 提供的所有可用工具和报告也一样。Managing a huge number of databases might be impossible to do efficiently even with all available tools and reports that SQL Database and Azure provide. 可考虑使用自动优化将某些监视和优化操作委派给 SQL 数据库,而不是手动监视和优化数据库。Instead of monitoring and tuning your database manually, you might consider delegating some of the monitoring and tuning actions to SQL Database by using automatic tuning. SQL 数据库自动应用建议、测试,并验证每个优化操作,确保性能持续提升。SQL Database automatically applies recommendations, tests, and verifies each of its tuning actions to ensure the performance keeps improving. 这样一来,SQL 数据库将以受控且安全的方式自动适应工作负荷。This way, SQL Database automatically adapts to your workload in a controlled and safe way. 自动优化是指在每次优化操作前后仔细监视和比较数据库性能。Automatic tuning means that the performance of your database is carefully monitored and compared before and after every tuning action. 如果性能未得到提升,则还原优化操作。If the performance doesn't improve, the tuning action is reverted.

SQL 数据库中有两个自动优化方面:Two automatic tuning aspects are available in SQL Database:

  • 自动索引管理:标识应在数据库中添加的索引以及应删除的索引。Automatic index management: Identifies indexes that should be added in your database, and indexes that should be removed.
  • 自动计划更正:识别有问题的计划并修复 SQL 计划性能问题。Automatic plan correction: Identifies problematic plans and fixes SQL plan performance problems.

自适应查询处理Adaptive query processing

可以使用自适应查询处理,包括交错执行多语句表值函数,批处理模式内存授予反馈和批处理模式自适应联接。You can use adaptive query processing, including interleaved execution for multi-statement table-valued functions, batch mode memory grant feedback, and batch mode adaptive joins. 每个自适应查询处理功能均应用类似的“学习和适应”技巧,帮助进一步解决与历史上棘手的查询优化问题相关的性能问题。Each of these adaptive query processing features applies similar "learn and adapt" techniques, helping further address performance issues related to historically intractable query optimization problems.

高级安全性和符合性Advanced security and compliance

SQL 数据库提供一系列内置安全性和符合性功能,帮助应用程序满足各种安全性和符合性要求。SQL Database provides a range of built-in security and compliance features to help your application meet various security and compliance requirements.

重要

Azure 已根据许多合规性标准认证了 Azure SQL 数据库(所有部署选项)。Azure has certified Azure SQL Database (all deployment options) against a number of compliance standards. 有关详细信息,请参阅 Microsoft Azure 信任中心,可以从中找到 SQL 数据库合规认证的最新列表。For more information, see the Azure Trust Center where you can find the most current list of SQL Database compliance certifications.

高级威胁防护Advance threat protection

高级数据安全是高级 SQL 安全功能的统一包。Advanced data security is a unified package for advanced SQL security capabilities. 它包括发现敏感数据并分类、管理数据库漏洞以及检测可能对数据库造成威胁的异常活动的功能。It includes functionality for discovering and classifying sensitive data, managing your database vulnerabilities, and detecting anomalous activities that might indicate a threat to your database. 它提供用于启用和管理这些功能的一个位置。It provides a single location for enabling and managing these capabilities.

  • 数据发现和分类Data discovery and classification:

    此功能提供内置于 Azure SQL 数据库的功能,可用于发现、分类、标记和保护数据库中的敏感数据。This feature provides capabilities built into Azure SQL Database for discovering, classifying, labeling, and protecting the sensitive data in your databases. 它提供数据库分类状态的见解,以及跟踪对数据库内和其边界外的敏感数据的访问。It provides visibility into your database classification state, and tracks the access to sensitive data within the database and beyond its borders.

  • 漏洞评估Vulnerability assessment:

    此服务可以发现、跟踪和帮助补救潜在的数据库漏洞。This service can discover, track, and help you remediate potential database vulnerabilities. 它可直观查看安全状态,包括解决安全问题的可操作步骤,并可加强数据库的防御工事。It provides visibility into your security state, and includes actionable steps to resolve security issues, and enhance your database fortifications.

  • 威胁检测Threat detection:

    此功能可检测异常活动,这些活动表示异常和可能有害的数据库访问或使用尝试。This feature detects anomalous activities that indicate unusual and potentially harmful attempts to access or exploit your database. 它不断监视数据库的可疑活动,并针对潜在漏洞、SQL 注入攻击和异常数据库访问模式提供即时的安全警报。It continuously monitors your database for suspicious activities, and provides immediate security alerts on potential vulnerabilities, SQL injection attacks, and anomalous database access patterns. 威胁检测警报提供可疑活动的详细信息,并建议如何调查和缓解威胁。Threat detection alerts provide details of the suspicious activity, and recommend action on how to investigate and mitigate the threat.

符合性和安全性审核Auditing for compliance and security

审核可跟踪数据库事件,并将事件写入 Azure 存储帐户中的审核日志。Auditing tracks database events and writes them to an audit log in your Azure storage account. 审核可帮助你遵守法规、了解数据库活动,以及深入了解可以指明业务考量因素或疑似安全违规的偏差和异常。Auditing can help you maintain regulatory compliance, understand database activity, and gain insight into discrepancies and anomalies that might indicate business concerns or suspected security violations.

数据加密Data encryption

SQL 数据库可提供加密功能来帮助保护数据。SQL Database helps secure your data by providing encryption. 对于动态数据,它使用传输层安全性For data in motion, it uses transport layer security. 对于静态数据,它使用透明数据加密For data at rest, it uses transparent data encryption. 对于使用中的数据,它使用 Always EncryptedFor data in use, it uses always encrypted.

Azure Active Directory 集成和多重身份验证Azure Active Directory integration and multi-factor authentication

通过 SQL 数据库,可使用 Azure Active Directory 集成集中管理数据库用户和其他 Microsoft 服务的身份。SQL Database enables you to centrally manage identities of database user and other Microsoft services with Azure Active Directory integration. 此功能简化了权限管理,增强了安全性。This capability simplifies permission management and enhances security. Azure Active Directory 支持多重身份验证,以便在支持单一登录过程的同时提高数据和应用程序安全性。Azure Active Directory supports multi-factor authentication to increase data and application security, while supporting a single sign-in process.

易于使用的工具Easy-to-use tools

SQL 数据库让应用程序的构建和维护更加轻松、高效。SQL Database makes building and maintaining applications easier and more productive. SQL 数据库让你能够专注于自己的专长:生成优秀的应用。SQL Database allows you to focus on what you do best: building great apps. 可使用已有工具和技能在 SQL 数据库进行管理和开发。You can manage and develop in SQL Database by using tools and skills you already have.

  • Azure 门户The Azure portal:

    用于管理所有 Azure 服务的基于 Web 的应用程序。A web-based application for managing all Azure services.

  • SQL Server Management StudioSQL Server Management Studio:

    用于管理任何 SQL 基础结构(从 SQL Server 到 SQL 数据库,不一而足)的免费可下载客户端应用程序。A free, downloadable client application for managing any SQL infrastructure, from SQL Server to SQL Database.

  • Visual Studio 中的 SQL Server Data ToolsSQL Server Data Tools in Visual Studio:

    用于开发 SQL Server 关系数据库、SQL 数据库、Integration Services 包、Analysis Services 数据模型和 Reporting Services 报告的免费可下载客户端应用程序。A free, downloadable client application for developing SQL Server relational databases, SQL databases, Integration Services packages, Analysis Services data models, and Reporting Services reports.

  • Visual Studio CodeVisual Studio Code:

    一个可免费下载的开源代码编辑器,适用于 Windows、macOS 和 Linux。A free, downloadable, open-source code editor for Windows, macOS, and Linux. 它支持各种扩展,其中包括 mssql 扩展(用于查询 Microsoft SQL Server、Azure SQL 数据库和 Azure SQL 数据仓库)。It supports extensions, including the mssql extension for querying Microsoft SQL Server, Azure SQL Database, and Azure SQL Data Warehouse.

SQL 数据库支持在 macOS、Linux 和 Windows 上使用 Python、Java、Node.js、PHP、 Ruby 和 .NET 生成应用程序。SQL Database supports building applications with Python, Java, Node.js, PHP, Ruby, and .NET on macOS, Linux, and Windows. SQL 数据库和 SQL Server 支持相同的连接库SQL Database supports the same connection libraries as SQL Server.

SQL 数据库常见问题解答SQL Database frequently asked questions

SQL 数据库的最新版本是什么?What is the current version of SQL Database?

SQL 数据库的最新版本为 V12。The current version of SQL Database is V12. 版本 V11 已停用。Version V11 has been retired.

我可以控制修补故障的时间吗?Can I control when patching downtime occurs?

否。No. 如果在应用中使用重试逻辑,则修补通常不会产生明显影响。The impact of patching is generally not noticeable if you employ retry logic in your app. 有关详细信息,请参阅规划 Azure SQL 数据库中的 Azure 维护事件For more information, see Planning for Azure maintenance events in Azure SQL Database.

Azure 混合权益问题Azure Hybrid Benefit questions

面向 SQL Server 的 Azure 混合权益是否具有双倍使用权利?Are there dual-use rights with Azure Hybrid Benefit for SQL Server?

我们为客户提供 180 天的许可证双倍使用权利,以确保无缝运行迁移。You have 180 days of dual use rights of the license to ensure migrations are running seamlessly. 在 180 天期限过后,只能在云中的 SQL 数据库内使用 SQL Server 许可证。After that 180-day period, you can only use the SQL Server license in the cloud in SQL Database. 在本地和云中不再有双重使用权利。You no longer have dual use rights on-premises and in the cloud.

面向 SQL Server 的 Azure 混合权益与许可证移动性有何区别?How does Azure Hybrid Benefit for SQL Server differ from license mobility?

我们为持有软件保障的 SQL Server 客户提供许可证移动权益,We offer license mobility benefits to SQL Server customers with Software Assurance. 以便将其许可证重新分配到合作伙伴的共享服务器。This allows reassignment of their licenses to a partner's shared servers. 可以在 Azure IaaS 和 AWS EC2 中使用此权益。You can use this benefit on Azure IaaS and AWS EC2.

与许可证移动性相比,面向 SQL Server 的 Azure 混合权益的区别主要体现在两个方面:Azure Hybrid Benefit for SQL Server differs from license mobility in two key areas:

  • 提供经济权益,以便将高度虚拟化的工作负荷转移到 Azure。It provides economic benefits for moving highly virtualized workloads to Azure. 对于高度虚拟化的应用程序,如果 SQL Server Enterprise Edition 客户在本地拥有一个核心,则他们可以在 Azure 的常规用途 SKU 中获得四个核心。SQL Server Enterprise Edition customers can get four cores in Azure in the General Purpose SKU for every core they own on-premises for highly virtualized applications. 许可证移动性不允许使用任何特殊成本权益将虚拟化工作负荷转移到云中。License mobility doesn't allow any special cost benefits for moving virtualized workloads to the cloud.
  • 它适用于 Azure(SQL 数据库托管实例)上与本地 SQL Server 高度兼容的 PaaS 目标It provides for a PaaS destination on Azure (SQL Database managed instance) that's highly compatible with SQL Server on-premises.

面向 SQL Server 的 Azure 混合权益的特殊权利有哪些?What are the specific rights of the Azure Hybrid Benefit for SQL Server?

SQL 数据库客户将获得与面向 SQL Server 的 Azure 混合权益相关的以下权利:SQL Database customers have the following rights associated with Azure Hybrid Benefit for SQL Server:

许可证足迹License footprint 面向 SQL Server 的 Azure 混合权益可带来哪些好处?What does Azure Hybrid Benefit for SQL Server get you?
具有 SA 的 SQL Server Enterprise Edition 核心客户SQL Server Enterprise Edition core customers with SA
  • 可以根据“常规用途”或“业务关键”SKU 支付基准费率Can pay base rate on either General Purpose or Business Critical SKU

  • 1 个本地核心 =“常规用途”SKU 中的 4 个核心1 core on-premises = 4 cores in General Purpose SKU

  • 1 个本地核心 =“业务关键”SKU 中的 1 个核心1 core on-premises = 1 core in Business Critical SKU
  • 具有 SA 的 SQL Server Standard Edition 核心客户SQL Server Standard Edition core customers with SA
  • 只能根据“常规用途”SKU 支付基准费率Can pay base rate on General Purpose SKU only

  • 1 个本地核心 =“常规用途”SKU 中的 1 个核心1 core on-premises = 1 core in General Purpose SKU
  • 后续步骤Next steps