cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
cancel
Showing results for 
Search instead for 
Did you mean: 

TCP/IP Issue

RohitKulkarni
Contributor

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
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!

Welcome to Databricks Community: Lets learn, network and celebrate together

Join our fast-growing data practitioner and expert community of 80K+ members, ready to discover, help and collaborate together while making meaningful connections. 

Click here to register and join today! 

Engage in exciting technical discussions, join a group with your peers and meet our Featured Members.