在 Azure Stack HCI 上部署 SQL ServerDeploy SQL Server on Azure Stack HCI

适用于:Azure Stack HCI 版本 20H2;SQL Server(所有受支持的版本)Applies to: Azure Stack HCI, version 20H2; SQL Server (all supported versions)

本主题提供了有关如何在 Azure Stack HCI 操作系统上规划、配置和部署 SQL Server 的指导。This topic provides guidance on how to plan, configure, and deploy SQL Server on the Azure Stack HCI operating system. 该操作系统是一种超融合基础设施 (HCI) 群集解决方案,它在混合的本地环境中托管虚拟化的 Windows 和 Linux 工作负荷及其存储。The operating system is a hyperconverged infrastructure (HCI) cluster solution that hosts virtualized Windows and Linux workloads and their storage in a hybrid on-premises environment.

解决方案概述Solution overview

Azure Stack HCI 提供了一个高度可用且经济高效的灵活平台,可运行 SQL Server 和存储空间直通。Azure Stack HCI provides a highly available, cost efficient, flexible platform to run SQL Server and Storage Spaces Direct. Azure Stack HCI 可以运行联机事务处理 (OLTP) 工作负荷、数据仓库和 BI,以及 AI 和基于大数据的高级分析。Azure Stack HCI can run Online Transaction Processing (OLTP) workloads, data warehouse and BI, and AI and advanced analytics over big data.

对于关键数据库,平台的灵活性尤其重要。The platform's flexibility is especially important for mission critical databases. 可以在使用 Windows Server 或 Linux 的虚拟机 (VM) 上运行 SQL Server,这样就可以根据需要整合多个数据库工作负荷并将更多 VM 添加到 Azure Stack HCI 环境。You can run SQL Server on virtual machines (VMs) that use either Windows Server or Linux, which allows you to consolidate multiple database workloads and add more VMs to your Azure Stack HCI environment as needed. 利用 Azure Stack HCI,还可以将 SQL Server 与 Azure Site Recovery 集成,以便为组织的数据提供可靠且安全的基于云的迁移、还原和保护解决方案。Azure Stack HCI also enables you to integrate SQL Server with Azure Site Recovery to provide a cloud-based migration, restoration, and protection solution for your organization's data that is reliable and secure.

部署 SQL ServerDeploy SQL Server

本部分概要介绍了如何获取用于 Azure Stack HCI 上的 SQL Server 的硬件,以及如何使用 Windows Admin Center 来管理服务器上的操作系统。This section describes at a high level how to acquire hardware for SQL Server on Azure Stack HCI, and use Windows Admin Center to manage the operating system on your servers. 本部分包括了有关如何设置 SQL Server、如何进行监视和性能优化以及如何使用高可用性 (HA) 和 Azure 混合服务的信息。Information on setting up SQL Server, monitoring and performance tuning, and using High Availability (HA) and Azure hybrid services is included.

步骤 1:获得 Azure Stack HCI 目录中的硬件Step 1: Acquire hardware from the Azure Stack HCI Catalog

首先,你需要购买硬件。First, you'll need to procure hardware. 若要购买硬件,最简单的方法是在 Azure Stack HCI 目录中查找首选的 Microsoft 硬件合作伙伴,购买预装了 Azure Stack HCI 操作系统的集成系统。The easiest way to do that is to locate your preferred Microsoft hardware partner in the Azure Stack HCI Catalog and purchase an integrated system with the Azure Stack HCI operating system preinstalled. 在此目录中,你可以进行筛选,以查找针对此类型的工作负荷进行了优化的供应商硬件。In the catalog, you can filter to see vendor hardware that is optimized for this type of workload.

否则,你需要在自己的硬件上部署 Azure Stack HCI 操作系统。Otherwise, you'll need to deploy the Azure Stack HCI operating system on your own hardware. 若要详细了解 Azure Stack HCI 部署选项以及如何安装 Windows Admin Center,请参阅部署 Azure Stack HCI 操作系统For details on Azure Stack HCI deployment options and installing Windows Admin Center, see Deploy the Azure Stack HCI operating system.

接下来,使用 Windows Admin Center 创建 Azure Stack HCI 群集Next, use Windows Admin Center to create an Azure Stack HCI cluster.

步骤 2:在 Azure Stack HCI 上安装 SQL ServerStep 2: Install SQL Server on Azure Stack HCI

你可以在运行 Windows Server 或 Linux 的 VM 上安装 SQL Server,具体取决于你的需求。You can install SQL Server on VMs running either Windows Server or Linux depending on your requirements.

有关安装 SQL Server 的说明,请参阅:For instructions on installing SQL Server, see:

步骤 3:对 SQL Server 进行监视和性能优化Step 3: Monitor and performance tune SQL Server

Microsoft 提供了一套综合的工具,用于监视 SQL Server 中的事件和优化物理数据库的设计。Microsoft provides a comprehensive set of tools for monitoring events in SQL Server and for tuning the physical database design. 工具的选择取决于你要执行的监视或优化的类型。Tool choice depends on the type of monitoring or tuning that you want to perform.

若要确保 Azure Stack HCI 上 SQL Server 实例的性能和正常运行,请参阅性能监视和优化工具To ensure the performance and health of your SQL Server instances on Azure Stack HCI, see Performance Monitoring and Tuning Tools.

若要优化 SQL Server 2017 和 SQL Server 2016,请参阅适用于具有高性能工作负荷的 SQL Server 2017 和 2016 的推荐更新和配置选项For tuning SQL Server 2017 and SQL Server 2016, see Recommended updates and configuration options for SQL Server 2017 and 2016 with high-performance workloads.

步骤 4:使用 SQL Server 高可用性功能Step 4: Use SQL Server high availability features

Azure Stack HCI 利用与 SQL Server 配合使用的 Windows Server 故障转移群集 (WSFC) 在发生硬件故障时为在 VM 中运行的 SQL Server 提供支持。Azure Stack HCI leverages Windows Server Failover Clustering with SQL Server (WSFC) to support SQL Server running in VMs in the event of a hardware failure. SQL Server 还提供 Always On 可用性组 (AG),目的是提供数据库级高可用性,这有助于应对应用程序和软件故障。SQL Server also offers Always On availability groups (AG) to provide database-level high availability that is designed to help with application and software faults. 除了 WSFC 和 AG 外,Azure Stack HCI 还可以使用 Always On 故障转移群集实例 (FCI),该实例基于用于共享存储的存储空间直通技术。In addition to WSFC and AG, Azure Stack HCI can use Always On Failover Cluster Instance (FCI), which is based on Storage Spaces Direct technology for shared storage.

这些选项都使用 Azure 云见证进行仲裁控制。These options all work with the Azure Cloud witness for quorum control. 在配置 Always On 可用性组时,对于置于不同物理节点上的 VM,建议你在 WSFC 中使用群集 AntiAffinity 规则,以便在主机发生故障时保持 SQL Server 的正常运行。We recommend using cluster AntiAffinity rules in WSFC for VMs placed on different physical nodes to maintain uptime for SQL Server in the event of host failures when you configure Always On availability groups.

步骤 5:设置 Azure 混合服务Step 5: Set up Azure hybrid services

有多个 Azure 混合服务可用来保持 SQL Server 数据和应用程序的安全。There are several Azure hybrid services that you can use to help keep your SQL Server data and applications secure. Azure Site Recovery 是一项灾难恢复即服务 (DRaaS)。Azure Site Recovery is a disaster recovery as a service (DRaaS). 若要详细了解如何使用此服务来保护应用程序的 SQL Server 后端,以便使工作负荷保持联机状态,请参阅为 SQL Server 设置灾难恢复For more information about using this service to protect the SQL Server back end of an application to help keep workloads online, see Set up disaster recovery for SQL Server.

Azure 备份允许你定义备份策略来保护企业工作负荷,并支持备份和还原 SQL Server 一致性。Azure Backup lets you define backup policies to protect enterprise workloads and supports backing up and restoring SQL Server consistency. 若要详细了解如何备份本地 SQL 数据,请参阅安装 Azure 备份服务器For more information about how to back up your on-premises SQL data, see Install Azure Backup Server.

另外,还可以使用 SQL Server 中的 SQL Server 托管备份功能来管理 Azure Blob 存储备份。Alternatively, you can use the SQL Server Managed Backup feature in SQL Server to manage Azure Blob Storage backups.

若要详细了解如何使用适用于非现场存档的此选项,请参阅:For more information about using this option that is suitable for off-site archiving, see:

除了这些备份方案之外,还可以设置 SQL Server 提供的其他数据库服务,包括 Azure 数据工厂用于 Azure 的 Integration Services (SSIS) 功能包In addition to these backup scenarios, you can set up other database services that SQL Server offers, including Azure Data Factory and Azure Feature Pack for Integration Services (SSIS).

后续步骤Next steps

若要详细了解如何使用 SQL Server,请参阅:For more information about working with SQL Server, see: