question

PcDE avatar image
0 Votes"
PcDE asked HimanshuSinha-MSFT commented

Connecting Synapse/Azure sql db from databricks notebook pyspark

Hi,
I have a req where we need to connect to azure synapse from databricks notebook. We had a class for connection which accepts server db username and pwd. We are trying to create obj for this and use the connection but unable to get in where we are getting time out issues. Can you suggest.
Am getting the following error:
('HYT00', '[HYT00] [unixODBC][Microsoft][ODBC Driver 17 for SQL Server]Login timeout expired (0) (SQLDriverConnect)')
Thanks in advance.

azure-databricks
· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hello @PcDE ,
We haven’t heard from you on the last response and was just checking back to see if you have a resolution yet .In case if have already reached out to the Microsoft Support , please do share the SR# , othereise request you to please do the needful as requested in the last response .
Thanks
Himanshu

0 Votes 0 ·

Hello @PcDE ,
We haven’t heard from you on the last response and was just checking back to see if you have a resolution yet .In case if have already reached out to the Microsoft Support , please do share the SR# , othereise request you to please do the needful as requested in the last response .
Thanks
Himanshu

0 Votes 0 ·

1 Answer

HimanshuSinha-MSFT avatar image
0 Votes"
HimanshuSinha-MSFT answered HimanshuSinha-MSFT edited

Hello @PcDE ,
Thanks for the ask and using the Microsoft Q&A platform .

The class which you are refering to is it for SQL or windows authentication ?. Can you try to create a SQL user on the Azure SQL/Synapase and see if that works ? To me it looks like it should work for SQL .

You may have to add the IP of the Adb server on the server firewall .

Just in case if you still facing issues please share more details about the class .


On other thing , is the SQL you are trying to connect is managed instance ( MI ) , if yes set specific rule in UDR and NSG to route/allow your internet client traffic (out bound direction).


Please do let me know how it goes .
Thanks
Himanshu
Please do consider clicking on "Accept Answer" and "Up-vote" on the post that helps you, as it can be beneficial to other community members

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.