Skip to content

Latest commit

 

History

History
117 lines (71 loc) · 5.84 KB

File metadata and controls

117 lines (71 loc) · 5.84 KB
title Connect Your SQL Server to Azure Arc
description Connect an instance of SQL Server to Azure Arc. Allows you to manage SQL Server centrally, as an Arc-enabled resource.
author anosov1960
ms.author sashan
ms.reviewer mikeray, maghan
ms.date 07/08/2025
ms.topic how-to
ms.custom
references_regions

Connect your SQL Server to Azure Arc

[!INCLUDE sqlserver]

[!INCLUDE automatic]

This article explains how to connect your SQL Server instance to Azure Arc. Before you proceed, complete the Prerequisites - SQL Server enabled by Azure Arc.

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.

Note

If your server is already connected to Azure, proceed to Connect your SQL Server to Azure Arc on a server already enabled by Azure Arc.

Generate an onboarding script for SQL Server

  1. Go to Azure Arc in the Azure portal.

  2. Under Data services, select SQL servers. Under SQL Server instances, select + Add.

    The Add existing SQL Server instances page opens.

  3. Select Connect SQL Server instances for a new registration or Register SQL Server instances for a disconnected instance.

  4. Review the prerequisites and select Next: Server details

  5. Specify:

    • Subscription
    • Resource group
    • Region
    • Operating system

    If necessary, specify the proxy your network uses to connect to the Internet.

    To use a specific name for Azure Arc enabled Server instead of default host name, users can add the name for Azure Arc enabled Server in Server Name.

    :::image type="content" source="media/join/server-details-sql-server-azure-arc.png" alt-text="Screenshot of server details for Azure Arc." lightbox="media/join/server-details-sql-server-azure-arc.png":::

  6. Select the SQL Server edition and license type you're using on this machine. Some Arc-enabled SQL Server features are only available for SQL Server instances with Software Assurance (Paid) or with Azure pay-as-you-go. For more information, review Configure SQL Server enabled by Azure Arc.

  7. 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.

    [!IMPORTANT]
    If the machine that hosts 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.

    :::image type="content" source="media/join/server-details-sql-server-management-azure-arc.png" alt-text="Screenshot of server management details." lightbox="media/join/server-details-sql-server-management-azure-arc.png":::

  8. Select Next: Tags to optionally add tags to the resource for your SQL Server instance.

  9. Select Run script to generate the onboarding script.

    :::image type="content" source="media/join/download-script-sql-server-azure-arc.png" alt-text="Screenshot of a download script." lightbox="media/join/download-script-sql-server-azure-arc.png":::

  10. Select Download to download the script to your machine.

Connect SQL Server instances to Azure Arc

In this step, execute the script you downloaded from the Azure portal, 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 installs it first, then installs the Azure extension for SQL Server. Azure connected machine agent registers the connected server as an Azure resource of type Server - Azure Arc, and the Azure extension for SQL Server connects the SQL Server instances as an Azure resource of type SQL Server - Azure Arc.

Important

Make sure to execute the script using an account that meets the minimum permission requirements described in prerequisites.

  1. Launch an admin instance of powershell.exe and sign in to your PowerShell module with your Azure credentials. Follow the sign-in instructions.

  2. Execute the downloaded script.

    & '.\RegisterSqlServerArc.ps1'

    [!NOTE]
    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.

  1. Use Azure CLI to sign in with your Azure credentials. Follow the sign in instructions

  2. Grant the execution permission to the downloaded script and execute it.

    sudo chmod +x ./RegisterSqlServerArc.sh
    ./RegisterSqlServerArc.sh

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.

:::image type="content" source="media/join/validate-sql-server-azure-arc.png" alt-text="Screenshot of validating a connected SQL Server." lightbox="media/join/validate-sql-server-azure-arc.png":::

Upgrade the extension

[!INCLUDE manage-extension]

Related content