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

什么是 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.

它基于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. Microsoft 处理 SQL 和操作系统代码的所有修补和更新。Microsoft 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.
  • 为 OLTP 应用程序设计的、具有高事务速率和最低延迟 i/o 的业务关键/高级服务层。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. 若要了解有关使用弹性池的软件即服务(SaaS)应用程序的设计模式的详细信息,请参阅具有 SQL 数据库的多租户 SaaS 应用程序的设计模式To learn more about design patterns for software as a service (SaaS) applications that use elastic pools, see Design patterns for multi-tenant SaaS applications with SQL Database.

脚本可以帮助监视和缩放弹性池。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. 使用 SQL 数据库中的自动优化,可以手动应用可修复问题的脚本,或让 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 可用性区域尝试防止在单个区域内生成单个数据中心的服务中断。Azure Availability Zones tries to protect against the outage of a single datacenter building within a single region. 它有助于防止网络丢失或网络丢失。It helps you protect against the loss of power or network to a building. 在 SQL 数据库中,您可以将不同的副本放在不同的可用性区域(而不是不同的建筑物)中。In SQL Database, you place the different replicas in different availability zones (different buildings, effectively).

事实上,Azure 的服务级别协议(SLA)是由 Microsoft 管理的数据中心的全球网络提供支持的,有助于保持应用程序运行24/7。In fact, the service level agreement (SLA) of Azure, powered by a global network of Microsoft-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 数据中心中配置最多四个可读辅助数据库。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.

  • 区域冗余数据库Zone-redundant databases:

    通过 SQL 数据库,可以跨多个可用性区域预配高级或业务关键数据库或弹性池。SQL Database allows you to provision premium or business critical databases or elastic pools across multiple availability zones. 由于这些数据库和弹性池具有多个冗余副本以实现高可用性,因此将这些副本置于多个可用性区域可提供更高的复原能力。Because these databases and elastic pools have multiple redundant replicas for high availability, placing these replicas into multiple availability zones provides higher resilience. 这包括能够自动从数据中心规模的故障中恢复,而不会丢失数据。This includes the ability to recover automatically from the datacenter scale failures, without data loss.

内置智能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. 智能见解可以通过大规模地自动监视 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 数据库之上运行SaaS 多租户应用的许多合作伙伴都依赖于自动性能优化,确保其应用程序始终具有稳定且可预测的性能。Many of our partners that run SaaS multi-tenant apps on top of SQL Database are relying on automatic performance tuning to make sure their applications always have stable and predictable performance. 对他们而言,此功能可大大降低午夜出现性能事故的风险。For them, this feature tremendously reduces the risk of having a performance incident in the middle of the night. 此外,由于部分客户群也使用 SQL Server,因此他们使用 SQL 数据库提供的相同索引建议来帮助其 SQL Server 客户。In addition, because part of their customer base also uses SQL Server, they're using the same indexing recommendations provided by SQL Database to help their SQL Server customers.

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.

重要

Microsoft 已根据一系列法规标准认证了 Azure SQL 数据库(所有部署选项)。Microsoft has certified Azure SQL Database (all deployment options) against a number of compliance standards. 有关详细信息,请参阅Microsoft Azure 信任中心,你可以在其中找到 SQL 数据库符合性认证的最新列表。For more information, see the Microsoft 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. 它支持扩展,其中包括用于查询 Microsoft SQL Server、Azure SQL 数据库和 Azure SQL 数据仓库的mssql 扩展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.

利用 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:

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 版客户可以在 Azure 中常规用途的每个核心中获取每个核心的四个核心。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 数据库托管实例)上的 PaaS 目标提供与本地 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
  • 与 SQL Server 工程团队合作Engage with the SQL Server engineering team

    后续步骤Next steps