cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
cancel
Showing results for 
Search instead for 
Did you mean: 

TCP/IP Issue

RohitKulkarni
Contributor II

Hello Team,

I am trying to read the data from Synapse analytics from databricks.The below is the Query to read the table.

%python

### Read from Azure Synapse table via spark.read.load 

df = spark.read \

 .format("com.databricks.spark.sqldw") \

 .option("url", f"jdbc:sqlserver://xyz.sql.azuresynapse.net:1433;database=Bronze;user=svc_datalakehouse@abc.com;password=qKfb5;encrypt=false;trustServerCertificate=true;hostNameInCertificate=xyz.sql.azuresynapse.net;loginTimeout=60;")\

  .option("tempDir", "abfss://xyz@xyz.dfs.core.windows.net/temp") \

 .option("forwardSparkAzureStorageCredentials", "true") \

 .option("dbTable", tableName) \

 .load()

I am getting error :

Azure Synapse Analytics failed to execute the JDBC query produced by the connector.

Underlying SQLException(s):

- com.microsoft.sqlserver.jdbc.SQLServerException: Cannot open server "abc.com" requested by the login. The login failed. ClientConnectionId:0995d0ab-c56d-40ac-8fc5-ac514083e38c [ErrorCode = 40532] [SQLState = S0001]

Please advise the solution.

Regards

Rohit

3 REPLIES 3

Prabakar
Esteemed Contributor III

@Rohit Kulkarni​ This normally happens because you cannot logon to the Azure SQL Server requested by the login, likely due to missing virtual network rule for the source subnet. Please refer the Microsoft community forum here.

Hello Prabakar,

Thanks for the response. But i am trying to connect to SQL Serverless SQL endpoint IN Synapse analytics not a Azure SQL Server.

Anonymous
Not applicable

Hi @Rohit Kulkarni​ 

Hope all is well! Just wanted to check in if you were able to resolve your issue and would you be happy to share the solution or mark an answer as best? Else please let us know if you need more help. 

We'd love to hear from you.

Thanks!

Connect with Databricks Users in Your Area

Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you won’t want to miss the chance to attend and share knowledge.

If there isn’t a group near you, start one and help create a community that brings people together.

Request a New Group