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

Azure 虚拟机上的 SQL Server 是什么?What is SQL Server on Azure Virtual Machines? (Windows)(Windows)

Azure 虚拟机上的 SQL Server 允许你在云中使用完整版本的 SQL Server,不需管理任何本地硬件。SQL Server on Azure virtual machines enables you to use full versions of SQL Server in the Cloud without having to manage any on-premises hardware. 使用即用即付时,SQL Server VM 还可以简化许可成本。SQL Server VMs also simplify licensing costs when you pay as you go.

Azure 虚拟机在全球许多不同的地理区域运行,Azure virtual machines run in many different geographic regions around the world. 并提供各种虚拟机大小They also offer a variety of machine sizes. 使用虚拟机映像库可以创建 SQL Server VM,而且版本和操作系统都很正确。The virtual machine image gallery allows you to create a SQL Server VM with the right version, edition, and operating system. 因此,虚拟机适用于许多不同的 SQL Server 工作负荷。This makes virtual machines a good option for a many different SQL Server workloads.

自动更新Automated updates

SQL Server Azure VM 可以使用自动修补来安排维护时段,以便自动安装重要的 Windows 和 SQL Server 更新。SQL Server Azure VMs can use Automated Patching to schedule a maintenance window for installing important windows and SQL Server updates automatically.

自动备份Automated backups

SQL Server Azure VM 可以利用自动备份,定期创建数据库到 Blob 存储的备份。SQL Server Azure VMs can take advantage of Automated Backup, which regularly creates backups of your database to blob storage. 也可以手动使用此技术。You can also manually use this technique. 有关详细信息,请参阅 使用 Azure 存储进行 SQL Server 备份和还原For more information, see Use Azure Storage for SQL Server Backup and Restore.

高可用性High availability

如果需要高可用性,请考虑配置 SQL Server 可用性组。If you require high availability, consider configuring SQL Server Availability Groups. 这涉及虚拟网络中的多个 SQL Server Azure VM。This involves multiple SQL Server Azure VMs in a virtual network. 可以手动配置高可用性解决方案,也可以在 Azure 门户中使用模板进行自动配置。You can configure your high availability solution manually, or you can use templates in the Azure portal for automatic configuration. 有关所有高可用性选项的概述,请参阅 Azure 虚拟机中 SQL Server 的高可用性和灾难恢复For an overview of all high availability options, see High Availability and Disaster Recovery for SQL Server in Azure Virtual Machines.

性能Performance

Azure 虚拟机提供的虚拟机大小取决于工作负荷需求。Azure virtual machines offer different machine sizes to meet various workload demands. SQL VM 还提供按性能要求优化的自动存储配置。SQL VMs also provide automated storage configuration, which is optimized for your performance requirements. 若要详细了解如何为 SQL VM 配置存储,请参阅 SQL Server VM 的存储配置For more information about configuring storage for SQL VMs, see Storage configuration for SQL Server VMs. 若要优化性能,请参阅 Azure 虚拟机中 SQL Server 的性能最佳做法To fine-tune performance, see the Performance best practices for SQL Server in Azure Virtual Machines.

SQL VM 入门Get started with SQL VMs

若要开始,请选择一个 SQL Server 虚拟机映像,其中包含所需的版本和操作系统。To get started, choose a SQL Server virtual machine image with your required version, edition, and operating system. 以下部分提供了有关 SQL Server 虚拟机库映像到 Azure 门户的直接链接。The following sections provide direct links to the Azure portal for the SQL Server virtual machine gallery images.

提示

有关如何了解 SQL 映像定价的详细信息,请参阅 SQL Server Azure VM 定价指南

即用即付Pay as you go

下表提供了一个矩阵,其中包含即用即付 SQL Server 映像。The following table provides a matrix of pay-as-you-go SQL Server images.

版本Version 操作系统Operating System 版本Edition
SQL Server 2017SQL Server 2017 Windows Server 2016Windows Server 2016 EnterpriseStandardWebExpressDeveloperEnterprise, Standard, Web, Express, Developer
SQL Server 2016 SP2SQL Server 2016 SP2 Windows Server 2016Windows Server 2016 EnterpriseStandardWebExpressDeveloperEnterprise, Standard, Web, Express, Developer
SQL Server 2014 SP2SQL Server 2014 SP2 Windows Server 2012 R2Windows Server 2012 R2 EnterpriseStandardWebExpressEnterprise, Standard, Web, Express
SQL Server 2012 SP4SQL Server 2012 SP4 Windows Server 2012 R2Windows Server 2012 R2 EnterpriseStandardWebExpressEnterprise, Standard, Web, Express
SQL Server 2008 R2 SP3SQL Server 2008 R2 SP3 Windows Server 2008 R2Windows Server 2008 R2 EnterpriseStandardWebExpressEnterprise, Standard, Web, Express

若要查看可用的 Linux SQL Server 虚拟机映像,请参阅 Azure 虚拟机上的 SQL Server 概述 (Linux)To see the available Linux SQL Server virtual machine images, see Overview of SQL Server on Azure Virtual Machines (Linux).

备注

现在可以更改按用量付费的 SQL Server VM 的许可模式来使用自己的许可证。 有关详细信息,请参阅如何更改 SQL VM 的许可模型

自带许可Bring your own license

也可以自带许可 (BYOL)。You can also bring your own license (BYOL). 在此方案中,只需支付 VM 费用,SQL Server 许可不需要任何额外的费用。In this scenario, you only pay for the VM without any additional charges for SQL Server licensing. 自带许可证长时间会节省资金,因为可以持续使用生产型工作负荷。Bringing your own license can save you money over time for continuous production workloads. 有关使用此选项的要求,请参阅 SQL Server Azure VM 定价指南For requirements to use this option, see Pricing guidance for SQL Server Azure VMs.

若要自带许可证,可以转换现有的按用量付费的 SQL VM,也可以部署前缀为 {BYOL} 的映像。To bring your own license, you can either convert an existing pay-per-usage SQL VM, or you can deploy an image with the prefixed {BYOL}. 若要详细了解如何在按用量付费和 BYOL 之间切换许可模型,请参阅如何更改 SQL VM 的许可模型For more information about switching your licensing model between pay-per-usage and BYOL, see How to change the licensing model for a SQL VM.

版本Version 操作系统Operating system 版本Edition
SQL Server 2017SQL Server 2017 Windows Server 2016Windows Server 2016 Enterprise BYOLStandard BYOLEnterprise BYOL, Standard BYOL
SQL Server 2016 SP2SQL Server 2016 SP2 Windows Server 2016Windows Server 2016 Enterprise BYOLStandard BYOLEnterprise BYOL, Standard BYOL
SQL Server 2014 SP2SQL Server 2014 SP2 Windows Server 2012 R2Windows Server 2012 R2 Enterprise BYOLStandard BYOLEnterprise BYOL, Standard BYOL
SQL Server 2012 SP4SQL Server 2012 SP4 Windows Server 2012 R2Windows Server 2012 R2 Enterprise BYOLStandard BYOLEnterprise BYOL, Standard BYOL

可以使用 PowerShell 部署 Azure 门户中不可用的较旧的 SQL Server 映像。It is possible to deploy an older image of SQL Server that is not available in the Azure Portal using PowerShell. 若要使用 Powershell 查看所有可用映像,请使用以下命令:To view all available images using Powershell, use the following command:

Get-AzVMImageOffer -Location $Location -Publisher 'MicrosoftSQLServer'

有关使用 PowerShell 部署 SQL Server VM 的详细信息,请查看如何使用 Azure PowerShell 预配 SQL Server 虚拟机For more information about deploying SQL Server VMs using PowerShell, view How to provision SQL Server virtual machines with Azure PowerShell.

连接到 VMConnect to the VM

创建 SQL Server VM 以后,即可从 SQL Server Management Studio (SSMS) 之类的应用程序或工具连接到该 VM。After creating your SQL Server VM, connect to it from applications or tools, such as SQL Server Management Studio (SSMS). 有关说明,请参阅连接到 Azure 上的 SQL Server 虚拟机For instructions, see Connect to a SQL Server Virtual Machine on Azure.

迁移数据Migrate your data

如果已有数据库,会想要将该数据库移至新预配的 SQL VM。If you have an existing database, you'll want to move that to the newly provisioned SQL VM. 有关迁移选项的列表和指导,请参阅将数据库迁移到 Azure VM 上的 SQL ServerFor a list of migration options and guidance, see Migrating a Database to SQL Server on an Azure VM.

SQL VM 映像刷新策略SQL VM image refresh policy

对于每种支持的操作系统和版本的组合,Azure 只保留一个虚拟机映像。Azure only maintains one virtual machine image for each supported operating system, version, and edition combination. 这意味着,随着时间的推移,映像会进行刷新,旧映像会被删除。This means that over time images are refreshed, and older images are removed. 有关详细信息,请参阅 SQL Server VM 常见问题解答的“映像”部分。For more information, see the Images section of the SQL Server VMs FAQ.

客户体验改善计划 (CEIP)Customer experience improvement program (CEIP)

客户体验改善计划 (CEIP) 默认情况下已启用。The Customer Experience Improvement Program (CEIP) is enabled by default. 这样会定期将报告发送至 Microsoft,帮助改进 SQL Server。This periodically sends reports to Microsoft to help improve SQL Server. CEIP 不需要执行管理任务,除非用户想要在预配后将其禁用。There is no management task required with CEIP unless you want to disable it after provisioning. 可以通过远程桌面连接到 VM,以自定义或禁用 CEIP。You can customize or disable the CEIP by connecting to the VM with remote desktop. 然后运行“SQL Server 错误和使用情况报告”实用工具。Then run the SQL Server Error and Usage Reporting utility. 请按照说明禁用报告功能。Follow the instructions to disable reporting. 有关数据收集的详细信息,请参阅 SQL Server 隐私声明For more information about data collection, see the SQL Server Privacy Statement.

Windows 虚拟机Windows Virtual Machines

存储Storage

网络Networking

SQLSQL

后续步骤Next steps

Azure 虚拟机上的 SQL Server 入门:Get started with SQL Server on Azure virtual machines:

获取有关 SQL VM 的常见问题的解答:Get answers to commonly asked questions about SQL VMs: