What do you need before ?
- An Azure subscription.
- An on-premises SQL Server.
- Azure Data Factory instance.
- Azure Relay namespace.
Step 1: Set up Azure Relay
- In the Azure portal, navigate to Azure Relay and create a new namespace. Follow the on-screen instructions to set it up.
- Within your Azure Relay namespace, go to "Hybrid Connections" and create a new connection. Note the connection string, as you'll need it for the client and listener configuration.
Step 2: Configure the On-premises SQL Server for Azure Relay
- Install Relay Hybrid Connection Manager on the machine hosting your SQL Server.
- Open the Hybrid Connection Manager and add a new Hybrid Connection using the connection string you obtained during the Hybrid Connection setup in Azure Relay. This links your on-premises SQL Server to the Azure Relay.
Step 3: Set up Azure Data Factory
- In ADF, navigate to "Manage" > "Integration runtimes" > "New". Choose "Self-hosted" and follow the instructions. The self-hosted IR acts as a bridge between your on-premises data sources and ADF.
- Install the Self-hosted Integration Runtime on an on-premises machine that can communicate with your SQL Server. This machine will use the Azure Relay to securely access your on-premises SQL Server.
- After installation, register the IR with ADF using the key provided during the IR setup in ADF. Ensure the IR machine has network access to your SQL Server.
Step 4: Create a Linked Service to SQL Server in ADF
- In ADF, navigate to "Manage" > "Linked services" > "New".
- Select "SQL Server" as the data store and use the self-hosted IR for connectivity.
- Provide the necessary connection details for your on-premises SQL Server, such as the server name, database name, authentication type, username, and password.
Step 5: Create and Run a Pipeline
- Create a new pipeline in ADF and drag a "Copy Data" activity onto the canvas.
- Configure the source to use the SQL Server linked service you created. Specify the SQL query or table you want to use.
- Configure the sink (destination) where you want to store the data, such as Azure Blob Storage, Azure SQL Database, etc.
- Debug and trigger the pipeline to start the data transfer process from your on-premises SQL Server to Azure through Azure Relay.
See old threads :
https://learn.microsoft.com/en-us/azure/azure-functions/functions-hybrid-powershell
https://learn.microsoft.com/en-us/azure/logic-apps/logic-apps-gateway-connection
https://learn.microsoft.com/en-us/azure/logic-apps/logic-apps-azure-functions?tabs=consumption