Azure 虛擬機器上的 SQL Server 概觀 (Windows)Overview of SQL Server on Azure Virtual Machines (Windows)

本主題說明在 Azure Windows 虛擬機器 (VM) 上執行 SQL Server 的選項,以及提供入口網站映像的連結常見工作的概觀。This topic describes your options for running SQL Server on Azure Windows virtual machines (VMs), along with links to portal images and an overview of common tasks.

注意

如果您已熟悉 SQL Server,並只需要了解如何部署 SQL Server Windows VM,請參閱在 Azure 中佈建 Windows SQL Server VMIf you're already familiar with SQL Server and just want to see how to deploy a SQL Server Windows VM, see Provision a Windows SQL Server VM in the Azure. 或者如果您需要使用 SQL Server 建立 Linux VM,請參閱在 Azure 中佈建 Linux SQL Server VMOr if you want to create a Linux VM with SQL Server, see Provision a Linux SQL Server VM in the Azure

如果您是資料庫管理員或開發人員,Azure VM 提供您將內部部署 SQL Server 工作負載和應用程式移動到雲端的方式。If you are a database administrator or a developer, Azure VMs provide a way to move your on-premises SQL Server workloads and applications to the Cloud.

案例Scenarios

可能會有許多原因讓您選擇主控 Azure 中的資料。There are many reasons that you might choose to host your data in Azure. 如果您的應用程式移至 Azure,則也會改善移動資料的效能。If your application is moving to Azure, it improves performance to also move the data. 但是還有其他好處。But there are other benefits. 您會自動取得多個資料中心的存取權,以獲得全域支援和災害復原。You automatically have access to multiple data centers for a global presence and disaster recovery. 資料也是高度安全且具有持久性。The data is also highly secured and durable.

在 Azure VM 上執行的 SQL Server,是用來將關聯式資料儲存到 Azure 的選項之一。SQL Server running on Azure VMs is one option for storing your relational data in Azure. 它在數個案例中是很好的選擇。It is good choice for several scenarios. 例如,您可能要盡可能以類似方法將 Azure VM 設定為內部部署 SQL Server 的電腦。For example, you might want to configure the Azure VM as similarly as possible to an on-premises SQL Server machine. 或者,您可能要在相同的資料庫伺服器上執行其他應用程式和服務。Or you might want to run additional applications and services on the same database server. 有兩個主要資源可協助您思考更多的案例和考量︰There are two main resources that can help you think through even more scenarios and considerations:

建立新的 SQL VMCreate a new SQL VM

下列各節提供 Azure 入口網站中 SQL Server 虛擬機器資源庫映像的直接連結。The following sections provide direct links to the Azure portal for the SQL Server virtual machine gallery images. 視您選取的映像而定,您可以按分鐘支付 SQL Server 授權成本,或者可以自備授權 (BYOL)。Depending on the image you select, you can either pay for SQL Server licensing costs on a per-minute basis, or you can bring your own license (BYOL).

在 Azure 入口網站中佈建 SQL Server 虛擬機器教學課程中尋找適用於建立新 SQL VM 的逐步指引。Find step-by-step guidance for creating a new SQL VM in the tutorial, Provision a SQL Server virtual machine in the Azure portal. 此外,檢閱 SQL Server VM 的效能最佳作法,該文說明如何選取適當的機器大小和佈建期間其他可用的功能。Also, review the Performance best practices for SQL Server VMs, which explains how to select the appropriate machine size and other features available during provisioning.

選項 1︰利用每分鐘授權建立 SQL VMOption 1: Create a SQL VM with per-minute licensing

下表提供虛擬機器資源庫中最新的 SQL Server 映像對照表。The following table provides a matrix of the latest SQL Server images in the virtual machine gallery. 按一下任何連結,即可開始建立採用您指定的版本和作業系統的新 SQL VM。Click on any link to begin creating a new SQL VM with your specified version, edition, and operating system.

提示

若要了解這些映像的 VM 和 SQL 定價,請參閱 SQL Server Azure VM 的定價指導方針To understand the VM and SQL pricing for these images, see Pricing guidance for SQL Server Azure VMs.

版本Version 作業系統Operating System 版本Edition
SQL Server 2017SQL Server 2017 Windows Server 2016Windows Server 2016 EnterpriseStandardWebExpressDeveloperEnterprise, Standard, Web, Express, Developer
SQL Server 2016 SP1SQL Server 2016 SP1 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 SP3SQL Server 2012 SP3 Windows Server 2012 R2Windows Server 2012 R2 EnterpriseStandardWebExpressEnterprise, Standard, Web, Express

注意

若要查看可用的 Linux SQL Server 虛擬機器映像,請參閱 Azure 虛擬機器 (Linux) 上的 SQL Server 概觀To see the available Linux SQL Server virtual machine images, see Overview of SQL Server on Azure Virtual Machines (Linux).

選項 2︰利用現有授權建立 SQL VM Option 2: Create a SQL VM with an existing 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. 若要使用自己的授權,請使用 SQL Server 版本及下列作業系統的矩陣。To use your own license, use the matrix of SQL Server versions, editions, and operating systems below. 在入口網站中,這些映像名稱前面會加上 {BYOL}In the portal, these image names are prefixed with {BYOL}.

提示

長期下來,自備授權可以讓您節省連續生產工作負載的成本。Bringing your own license can save you money over time for continuous production workloads. 如需詳細資訊,請參閱 SQL Server Azure VM 的定價指導方針For more information, see Pricing guidance for SQL Server Azure VMs.

版本Version 作業系統Operating system 版本Edition
SQL Server 2016 SP1SQL Server 2016 SP1 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 SP2SQL Server 2012 SP2 Windows Server 2012 R2Windows Server 2012 R2 Enterprise BYOLStandard BYOLEnterprise BYOL, Standard BYOL

除了這份清單,還有其他的 SQL Server 版本和作業系統組合可用。In addition to this list, other combinations of SQL Server versions and operating systems are available. 在 Azure 入口網站中透過市集搜尋來尋找其他映像 (搜尋 "{BYOL} SQL Server")。Find other images through a marketplace search in the Azure portal (search for "{BYOL} SQL Server").

重要

若要使用 BYOL VM 映像,您必須具備 Enterprise 合約和 Azure 上透過軟體保證的授權流動性To use BYOL VM images, you must have an Enterprise Agreement with License Mobility through Software Assurance on Azure. 您也需要您要使用的 SQL Server 版本的有效授權。You also need a valid license for the version/edition of SQL Server you want to use. 您必須在佈建您的 VM 的 10 天內 提供必要的 BYOL 資訊給 MicrosoftYou must provide the necessary BYOL information to Microsoft within 10 days of provisioning your VM.

注意

不可能將支付 SQL Server VM 的每分鐘付費授權模式變更成使用自己的授權。It is not possible to change the licensing model of a pay-per-minute SQL Server VM to use your own license. 在此情況下,您必須建立新的 BYOL VM,並將資料庫移轉到新的 VM。In this case, you must create a new BYOL VM and migrate your databases to the new VM.

管理您的 SQL VMManage your SQL VM

佈建之後您的 SQL Server VM 之後,有幾個選用的管理工作。After provisioning your SQL Server VM, there are several optional management tasks. 在許多方面,您設定和管理 SQL Server 的方式,完全如同您管理內部部署 SQL Server 執行個體。In many aspects, you configure and manage SQL Server exactly like you would manage an on-premises SQL Server instance. 不過,有些是 Azure 特有的工作。However, some tasks are specific to Azure. 下列各節強調上述某些領域並提供詳細資訊的連結。The following sections highlight some of these areas with links to more information.

連接至 VMConnect to the VM

最基本的管理步驟之一,是透過工具連接到您的 SQL Server VM,例如 SQL Server Management Studio (SSMS)。One of the most basic management steps is to connect to your SQL Server VM through tools, such as SQL Server Management Studio (SSMS). 如需如何連接至新 SQL Server VM 的指示,請參閱連接 Azure 上的 SQL Server 虛擬機器For instructions on how to connect to your new SQL Server VM, 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.

設定高可用性Configure high availability

如果您需要高可用性,請考慮設定 SQL Server 可用性群組。If you require high availability, consider configuring SQL Server Availability Groups. 這牽涉到虛擬網路中多個 Azure VM。This involves multiple Azure VMs in a virtual network. Azure 入口網站有一個範本,己經有您需要的設定。The Azure portal has a template that sets up this configuration for you. 如需詳細資訊,請參閱 在 Azure Resource Manager 虛擬機器中設定 AlwaysOn 可用性群組For more information, see Configure an AlwaysOn availability group in Azure Resource Manager virtual machines. 如果您想要手動設定「可用性群組」及關聯的接聽程式,請參閱 在 Azure VM 中設定 AlwaysOn 可用性群組If you want to manually configure your Availability Group and associated listener, see Configure AlwaysOn Availability Groups in Azure VM.

如需其他高可用性注意事項,請參閱 Azure 虛擬機器中的 SQL Server 高可用性和災害復原For other high availability considerations, see High Availability and Disaster Recovery for SQL Server in Azure Virtual Machines.

備份您的資料Back up your data

Azure VM 可以利用 自動備份,以定期建立資料庫的備份至 Blob 儲存體。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. 如需所有備份與還原選項的概觀,請參閱 Azure 虛擬機器中的 SQL Server 備份和還原For an overview of all backup and restore options, see Backup and Restore for SQL Server in Azure Virtual Machines.

自動更新Automate updates

Azure VM 可以使用 自動修補 來排程維護期間,以便自動安裝重要的 Windows 和 SQL Server 更新。Azure VMs can use Automated Patching to schedule a maintenance window for installing important windows and SQL Server updates automatically.

客戶經驗改進計畫 (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.

後續步驟Next steps

若有定價方面的問題,請參閱 SQL Server Azure VM 的定價指導方針Azure 定價頁面For questions about pricing, see Pricing guidance for SQL Server Azure VMs and the Azure pricing page. OS/軟體清單中選取 SQL Server 的目標版本。Select your target edition of SQL Server in the OS/Software list. 然後檢視不同大小的虛擬機器價格。Then view the prices for differently sized virtual machines.

其他問題?More question? 請先參閱 Azure 虛擬機器上的 SQL Server 常見問題集First, see the SQL Server on Azure Virtual Machines FAQ. 也請將您的問題或意見加入任何 SQL VM 主題的底部來與 Microsoft 和社群互動。But also add your questions or comments to the bottom of any SQL VM topics to interact with Microsoft and the community.