Get started with Azure Synapse Link for Azure SQL Database - Azure Synapse Analytics (2024)

  • Article

This article is a step-by-step guide for getting started with Azure Synapse Link for Azure SQL Database. For an overview of this feature, see Azure Synapse Link for Azure SQL Database.

Prerequisites

  • To get Azure Synapse Link for SQL, see Create a new Azure Synapse workspace. The current tutorial is to create Azure Synapse Link for SQL in a public network. This article assumes that you selected Disable Managed virtual network and Allow connections from all IP address when you created an Azure Synapse workspace. If you want to configure Azure Synapse Link for Azure SQL Database with network security, also see Configure Azure Synapse Link for Azure SQL Database with network security.

  • For database transaction unit (DTU)-based provisioning, make sure that your Azure SQL Database service is at least Standard tier with a minimum of 100 DTUs. Free, Basic, or Standard tiers with fewer than 100 DTUs provisioned aren't supported.

Configure your source Azure SQL database

  1. Sign in to the Azure portal.

  2. Go to your Azure SQL logical server, select Identity, and then set System assigned managed identity to On.

  3. Go to Networking, and then select the Allow Azure services and resources to access this server checkbox.

  4. Using Microsoft SQL Server Management Studio (SSMS) or Azure Data Studio, connect to the logical server.If you want to have your Azure Synapse workspace connect to your Azure SQL database by using amanaged identity, set the Microsoft Entra admin permissions on the logical server. To apply the privileges in step 6, use the same admin name to connect tothe logical server with administrative privileges.

  5. Expand Databases, right-click the database you've created, and then select New Query.

    Get started with Azure Synapse Link for Azure SQL Database - Azure Synapse Analytics (3)

  6. If you want to have your Azure Synapse workspace connect to your source Azure SQL database by using a managed identity, run the following script to provide the managed identity permission to the source database.

    You can skip this step if you instead want to have your Azure Synapse workspace connect to your source Azure SQL database via SQL authentication.

    CREATE USER <workspace name> FROM EXTERNAL PROVIDER;ALTER ROLE [db_owner] ADD MEMBER <workspace name>;
  7. You can create a table with your own schema. The following code is just an example of a CREATE TABLE query. You can also insert some rows into this table to ensure that there's data to be replicated.

    CREATE TABLE myTestTable1 (c1 int primary key, c2 int, c3 nvarchar(50)) 

Create your target Azure Synapse SQL pool

  1. Open Synapse Studio.

  2. Go to the Manage hub, select SQL pools, and then select New.

  3. Enter a unique pool name, use the default settings, and create the dedicated pool.

  4. You need to create a schema if your expected schema isn't available in the target Azure Synapse SQL database. If your schema is database owner (dbo), you can skip this step.

Create the Azure Synapse Link connection

  1. On the left pane of the Azure portal, select Integrate.

  2. On the Integrate pane, select the plus sign (+), and then select Link connection.

  3. Under Source linked service, select New.

    Get started with Azure Synapse Link for Azure SQL Database - Azure Synapse Analytics (6)

  4. Enter the information for your source Azure SQL database.

    • Select the subscription, server, and database corresponding to your Azure SQL database.
    • Do either of the following:
      • To connect your Azure Synapse workspace to the source database by using the workspace's managed identity, set Authentication type to Managed Identity.
      • To use SQL authentication instead, if you know the username and password to use, select SQL Authentication.

    Get started with Azure Synapse Link for Azure SQL Database - Azure Synapse Analytics (7)

    Note

    Only the Linked Service in Legacy version is supported.

  5. Select Test connection to ensure that the firewall rules are properly configured and the workspace can successfully connect to the source Azure SQL database.

  6. Select Create.

    Note

    The linked service that you create here isn't dedicated to Azure Synapse Link for SQL. It can be used by any workspace user who has the appropriate permissions. Take time to understand the scope of users who might have access to this linked service and its credentials. For more information about permissions in Azure Synapse workspaces, see Azure Synapse workspace access control overview - Azure Synapse Analytics.

  7. Select one or more source tables to replicate to your Azure Synapse workspace, and then select Continue.

    Note

    A specified source table can be enabled in only one link connection at a time.

  8. Select a target Azure Synapse SQL database and pool.

  9. Provide a name for your Azure Synapse Link connection, and select the number of cores for the link connection compute. These cores will be used for the movement of data from the source to the target.

    Note

    • The number of cores you select here are allocated to the ingestion service for processing data loading and changes. They don't affect the source Azure SQL Database configuration or the target dedicated SQL pool configuration.
    • We recommend starting low and increasing the number of cores as needed.
  10. Select OK.

  11. With the new Azure Synapse Link connection open, you can update the target table name, distribution type, and structure type.

    Note

    • Consider using heap table for the structure type when your data contains varchar(max), nvarchar(max), and varbinary(max).
    • Make sure that the schema in your Azure Synapse SQL dedicated pool has already been created before you start the link connection. Azure Synapse Link for SQL will create tables automatically under your schema in the Azure Synapse SQL dedicated pool.

    Get started with Azure Synapse Link for Azure SQL Database - Azure Synapse Analytics (8)

  12. In the Action on existing target table dropdown list, choose the option most appropriate for your scenario if the table already exists in the destination.

    • Drop and recreate table: The existing target table will be dropped and recreated.
    • Fail on non-empty table: If target table contains data, link connection for the given table will fail.
    • Merge with existing data: Data will be merged into the existing table.

    Note

    If you want to merge multiple sources into the same destination by choosing "Merge with existing data", make sure the sources contain different data to avoid conflict and unexpected result.

  13. Specify whether to enable transaction consistency across tables.

    • When this option is enabled, a transaction spanning across multiple tables on the source database is always replicated to the destination database in a single transaction. This, however, will create overhead on the overall replication throughput.
    • When the option is disabled, each table will replicate changes in its own transaction boundary to the destination in parallel connections, thus improving overall replication throughput.

    Note

    When you want to enable transaction consistency across tables, please also make sure the transaction isolation levels in your Synapse dedicated SQL pool is READ COMMITTED SNAPSHOT ISOLATION.

  14. Select Publish all to save the new link connection to the service.

Start the Azure Synapse Link connection

Select Start, and then wait a few minutes for the data to be replicated.

Note

A link connection will start from a full initial load from your source database, followed by incremental change feeds via the change feed feature in Azure SQL Database. For more information, see Azure Synapse Link for SQL change feed.

Monitor the status of the Azure Synapse Link connection

You can monitor the status of your Azure Synapse Link connection, see which tables are being initially copied over (snapshotting), and see which tables are in continuous replication mode (replicating).

  1. Go to the Monitor hub, and then select Link connections.

    Get started with Azure Synapse Link for Azure SQL Database - Azure Synapse Analytics (9)

  2. Open the Azure Synapse Link connection that you started, and view the status of each table.

  3. Select Refresh on the monitoring view for your connection to observe any updates to the status.

Query the replicated data

Wait for a few minutes, and then check to ensure that the target database has the expected table and data. You can also now explore the replicated tables in your target Azure Synapse SQL dedicated pool.

  1. In the Data hub, under Workspace, open your target database.

  2. Under Tables, right-click one of your target tables.

  3. Select New SQL script, and then select Top 100 rows.

  4. Run this query to view the replicated data in your target Azure Synapse SQL dedicated pool.

  5. You can also query the target database by using SSMS or other tools. Use the SQL dedicated endpoint for your workspace as the server name. This name is usually <workspacename>.sql.azuresynapse.net. Add Database=databasename@poolname as an extra connection string parameter when you're connecting via SSMS or other tools.

Add or remove a table in an existing Azure Synapse Link connection

To add or remove tables in Synapse Studio, do the following:

  1. Open the Integrate hub.

  2. Select the link connection that you want to edit, and then open it.

  3. Do either of the following:

    • To add a table, select New table.
    • To remove a table, select the trash can icon next to it.

    Note

    You can directly add or remove tables when a link connection is running.

Stop the Azure Synapse Link connection

To stop the Azure Synapse Link connection in Synapse Studio, do the following:

  1. In your Azure Synapse workspace, open the Integrate hub.

  2. Select the link connection that you want to edit, and then open it.

  3. Select Stop to stop the link connection, and it will stop replicating your data.

    Get started with Azure Synapse Link for Azure SQL Database - Azure Synapse Analytics (11)

    Note

    • If you restart a link connection after stopping it, it will start from a full initial load from your source database, and incremental change feeds will follow.
    • If you choose "Merge with existing data" as the action on existing target table, when you stop the link connection and restart it, the record deletions in source during that period won't be deleted in the destination. In such case, to ensure data consistency, consider to use pause/resume instead of stop/start, or to clean up the destination tables before you restart the link connection.

Related content

  • Get or set a managed identity for an Azure SQL Database logical server or managed instance
  • Azure Synapse Link for SQL FAQ
  • Configure Azure Synapse Link for Azure Cosmos DB
  • Configure Azure Synapse Link for Dataverse
  • Get started with Azure Synapse Link for SQL Server 2022
Get started with Azure Synapse Link for Azure SQL Database - Azure Synapse Analytics (2024)
Top Articles
Helpful abbreviations for speedy note-taking and note-making
What is the difference between cryptocurrency and stocks?
Hometown Pizza Sheridan Menu
Www.paystubportal.com/7-11 Login
Walgreens Pharmqcy
El Paso Pet Craigslist
Western Union Mexico Rate
Doublelist Paducah Ky
Beautiful Scrap Wood Paper Towel Holder
Routing Number 041203824
Midway Antique Mall Consignor Access
Erskine Plus Portal
Large storage units
What Does Dwb Mean In Instagram
Skylar Vox Bra Size
Costco Gas Foster City
Radio Aleluya Dialogo Pastoral
Houses and Apartments For Rent in Maastricht
Craiglist Kpr
Alfie Liebel
Ms Rabbit 305
Google Doodle Baseball 76
Att.com/Myatt.
Exl8000 Generator Battery
Del Amo Fashion Center Map
Meridian Owners Forum
Foodsmart Jonesboro Ar Weekly Ad
Inter Miami Vs Fc Dallas Total Sportek
Striffler-Hamby Mortuary - Phenix City Obituaries
Dubois County Barter Page
Kagtwt
Tamil Play.com
Lichen - 1.17.0 - Gemsbok! Antler Windchimes! Shoji Screens!
Kips Sunshine Kwik Lube
New York Rangers Hfboards
Aveda Caramel Toner Formula
Babylon 2022 Showtimes Near Cinemark Downey And Xd
Dr Adj Redist Cadv Prin Amex Charge
KM to M (Kilometer to Meter) Converter, 1 km is 1000 m
Hindilinks4U Bollywood Action Movies
Conan Exiles Armor Flexibility Kit
The Attleboro Sun Chronicle Obituaries
FREE - Divitarot.com - Tarot Denis Lapierre - Free divinatory tarot - Your divinatory tarot - Your future according to the cards! - Official website of Denis Lapierre - LIVE TAROT - Online Free Tarot cards reading - TAROT - Your free online latin tarot re
Squalicum Family Medicine
Goats For Sale On Craigslist
Hampton In And Suites Near Me
Gw2 Support Specter
Pas Bcbs Prefix
Costner-Maloy Funeral Home Obituaries
Shannon Sharpe Pointing Gif
Call2Recycle Sites At The Home Depot
E. 81 St. Deli Menu
Latest Posts
Article information

Author: Ms. Lucile Johns

Last Updated:

Views: 5977

Rating: 4 / 5 (61 voted)

Reviews: 84% of readers found this page helpful

Author information

Name: Ms. Lucile Johns

Birthday: 1999-11-16

Address: Suite 237 56046 Walsh Coves, West Enid, VT 46557

Phone: +59115435987187

Job: Education Supervisor

Hobby: Genealogy, Stone skipping, Skydiving, Nordic skating, Couponing, Coloring, Gardening

Introduction: My name is Ms. Lucile Johns, I am a successful, friendly, friendly, homely, adventurous, handsome, delightful person who loves writing and wants to share my knowledge and understanding with you.