Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
ivamsikrishna
Frequent Visitor

COPY DATA FROM ON-PREM SQL Database to Azure SQL Database

Hi We are trying to copy data from on-prem sql database to Azure SQL database in Microsoft Fabric. We have crated Gateway connection to connect to On-Prem sql database and Azure SQL Database with basic schema. We try to create a copy activity and add On-Prem SQL Database as source and Azure SQL Database ad target database. When we truunig the pipelines we are getting below error. Can please help with workaroount if there any  steps if we are missing to copy data from On-Prem sql database to Aacure aql data ase.  Much appreciated, 

ErrorCode=SqlFailedToConnect,'Type=Microsoft.DataTransfer.Common.Shared.HybridDeliveryException,Message=Cannot connect to SQL Database. Please contact SQL server team for further support. Server:

access.,Source=Microsoft.DataTransfer.ClientLibrary,''Type=System.Data.SqlClient.SqlException,Message=A connection was successfully established with the server, but then an error occurred during the pre-login handshake. (provider: TCP Provider, error: 0 - The semaphore timeout period has expired.),Source=.Net SqlClient Data Provider,SqlErrorNumber=121,Class=20,ErrorCode=-2146232060,State=0,Errors=[{Class=20,Number=121,State=0,Message=A connection was successfully established with the server, but then an error occurred during the pre-login handshake. (provider: TCP Provider, error: 0 - The semaphore timeout period has expired.),},],''Type=System.ComponentModel.Win32Exception,Message=The semaphore timeout period has expired,Source=,'

1 ACCEPTED SOLUTION
mabdollahi
Advocate III
Advocate III

Hi @ivamsikrishna 
It looks like the error is due to a network issue between Microsoft Fabric and your on-prem SQL Server—most likely from the gateway (Self-hosted Integration Runtime). Make sure the gateway is running and can connect to your SQL Server (you can test it using SSMS on the same machine). You can also try using Dataflow Gen2 as a workaround, which sometimes avoids these connection issues.
Regards,
Mehrdad Abdollahi

View solution in original post

4 REPLIES 4
v-priyankata
Community Support
Community Support

Hi @ivamsikrishna 

I hope the information shared by @mabdollahi helpful to you. @mabdollahi thank you for your inputs.
@ivamsikrishna  If your question has been answered, kindly mark the most relevant reply as the Accepted Solution. This small action can make a big difference for others who are looking for the same solution.

Thank you for reaching out to the Microsoft Fabric Forum Community.

 

Hi @ivamsikrishna 

I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions.

Hi @ivamsikrishna 

Hope everything’s going smoothly on your end. We haven’t heard back from you, so I wanted to check if the issue got sorted. If yes, marking the solution would be awesome for others who might run into the same thing.

 

mabdollahi
Advocate III
Advocate III

Hi @ivamsikrishna 
It looks like the error is due to a network issue between Microsoft Fabric and your on-prem SQL Server—most likely from the gateway (Self-hosted Integration Runtime). Make sure the gateway is running and can connect to your SQL Server (you can test it using SSMS on the same machine). You can also try using Dataflow Gen2 as a workaround, which sometimes avoids these connection issues.
Regards,
Mehrdad Abdollahi

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

June FBC25 Carousel

Fabric Monthly Update - June 2025

Check out the June 2025 Fabric update to learn about new features.

Top Kudoed Authors