Connect your SQL Server to Azure Arc
This article explains how to connect your SQL Server instance to Azure Arc. Before you proceed, complete the Prerequisites.
Onboard the server to Azure Arc
If the server that runs your SQL Server instance isn't yet connected to Azure, you can initiate the connection from the target machine using the onboarding script. This script connects the server to Azure and installs the Azure extension for SQL Server.
If your server is already connected to Azure, proceed to When the machine is already connected to an Arc-enabled Server.
Generate an onboarding script for SQL Server
Go to Azure Arc > SQL Server and select + Add
Under Connect SQL Server to Azure Arc, select Connect Servers
Review the prerequisites and select Next: Server details
- Resource group
- Operating system
If necessary, specify the proxy your network uses to connect to the Internet.
Select the SQL Server edition and license type you are using on this machine. Please note that some Arc-enabled SQL Server features are only available for SQL Servers with Software Assurance (Paid) or with Azure pay-as-you-go. For more information, review Manage SQL Server license type.
Specify the SQL Server instance(s) you want to exclude from registering (if you have multiple instances installed on the server). Separate each excluded instance by a space.
If the machine hosting the SQL Server instance is already connected to Azure Arc, make sure to select the same resource group that contains the corresponding Server - Azure Arc resource.
Select Next: Tags to optionally add tags to the resource for your SQL Server instance.
Select Run script to generate the onboarding script. Screenshot of
Select Download to download the script to your machine.
Connect SQL Server instances to Azure Arc
In this step, you'll take the script you downloaded from the Azure portal and execute it on the target machine. The script installs Azure extension for SQL Server. If the machine itself doesn't have the Azure connected machine agent installed, the script will install it first, then install the Azure extension for SQL Server. Azure connected machine agent will register the connected server as an Azure resource of type
Server - Azure Arc, and Azure extension for SQL Server will connect the SQL Server instances as Azure resources of type
SQL Server - Azure Arc.
Make sure to execute the script using an account that meets the minimum permission requirements described in prerequisites.
Launch an admin instance of powershell.exe and sign in to your PowerShell module with your Azure credentials. Follow the sign-in instructions.
Execute the downloaded script.
If you have yet to previously install the Az PowerShell module and see issues the first time you run it, follow the instructions in the script and rerun it.
Validate your Arc-enabled SQL Server resources
Go to Azure Arc > SQL Server and open the newly registered Arc-enabled SQL Server resource to validate.
Submit and view feedback for