Upravit

Sdílet prostřednictvím


Connect your SQL Server to Azure Arc with installer (.msi)

Applies to: SQL Server

This article explains how to connect your SQL Server instance to Azure Arc with an installer (.msi). Before you proceed, complete the Prerequisites.

Deploy SQL Server extension from AzureExtensionForSQLServer.msi

You can also onboard your SQL Server instances to Azure Arc by directly using AzureExtensionForSQLServer.msi. This method helps you integrate onboarding SQL Server instances to Arc with any existing deployment automation tools and services.

  1. Download AzureExtensionForSQLServer.msi.

  2. Open AzureExtensionForSQLServer.msi. This installs the necessary packages for onboarding SQL Server instances to Azure Arc.

  3. Open PowerShell console in admin mode and execute the following commands.

    If you use a Microsoft Entra ID service principal to authenticate, execute the following command on the target SQL Server.

    Note

    Microsoft Entra ID was previously known as Azure Active Directory (Azure AD).

    '& "$env:ProgramW6432\AzureExtensionForSQLServer\AzureExtensionForSQLServer.exe" --subId <subscriptionid> --resourceGroup <resourceGroupName> --location <AzureRegion> --tenantid <TenantId> --service-principal-app-id <servicePrincipalAppId> --service-principal-secret <servicePrincipalSecret> --proxy <proxy> --licenseType <licenseType> --excluded-SQL-instances <"MSSQLSERVER01 MSSQLSERVER02 MSSQLSERVER15"> --machineName <"ArcServerName">'
    

    Otherwise, execute the following command on the target SQL Server.

    '& "$env:ProgramW6432\AzureExtensionForSQLServer\AzureExtensionForSQLServer.exe" --subId <subscriptionid> --resourceGroup <resourceGroupName> --location $location --tenantid <TenantId> --proxy <proxy> --licenseType <licenseType> --excluded-SQL-instances <"MSSQLSERVER01 MSSQLSERVER02 MSSQLSERVER15"> --machineName <"ArcServerName">'
    

    Note

    Command line parameter "--machineName" is an optional parameter, if it is not provided then name of the Arc enabled server resource will be the host name of the machine.

    Important

    Microsoft SQL Server enabled by Azure Arc is licensed to you as part of your or your company's subscription license for Microsoft Azure Services. You may only use the software with Microsoft Azure Services and are subject to the terms and conditions of the agreement under which you obtained Microsoft Azure Services. You may not use the software if you do not have an active subscription license for Microsoft Azure Services.
    Microsoft Azure Legal Information: Microsoft Azure Legal Information and Microsoft Privacy Statement

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.

Screenshot of validating a connected SQL Server.

Next steps