Lesson Learned #140: Is it possible to connect from Azure SQL DB to Synapse using External Tables?

This post has been republished via RSS; it originally appeared at: Azure Database Support Blog articles.

Today, I got a very good question from a customer that they want to connect using Azure SQL DB to several tables of Azure Synapse using External Tables. Following I would like to share what was the lessons learned and how I was able to connect.


1) First of all, following I would like to share with you that script that I used to connect to Azure Synapse.


CREATE DATABASE scoped CREDENTIAL CredentialJM WITH IDENTITY ='UserNameToConnect' , SECREt = 'Password' CREATE EXTERNAL DATA SOURCE [RemoteData] WITH (TYPE = RDBMS, LOCATION = N'servername.database.windows.net', CREDENTIAL = [CredentialJM], DATABASE_NAME = N'databasename') GO CREATE EXTERNAL TABLE [dbo].[TableNameSynapse] ([id] [int] NOT NULL) WITH (DATA_SOURCE = [RemoteData])


2)  Finally, I was able to run and obtain data from the table TableNameSynapse without issues. 


3) Just wanted to comment one thing that it is very important, even if you create a PrivateLink for Synapse server and you specified in the firewall Deny public network access, always the connection will be stablished from the Azure public IP of the machine that is running your Azure SQL Database never with the private IP. Remember that the Private Link is for incoming connection request not outbound connection request.




REMEMBER: these articles are REPUBLISHED. Your best bet to get a reply is to follow the link at the top of the post to the ORIGINAL post! BUT you're more than welcome to start discussions here:

This site uses Akismet to reduce spam. Learn how your comment data is processed.