Connecting Synapse/Azure sql db from databricks notebook pyspark

PorusDataEngineer 6 Reputation points
2021-07-01T09:02:39.45+00:00

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
Azure Databricks
An Apache Spark-based analytics platform optimized for Azure.
1,915 questions
{count} votes

1 answer

Sort by: Most helpful
  1. HimanshuSinha-msft 19,376 Reputation points Microsoft Employee
    2021-07-01T22:45:16.797+00:00

    Hello @PorusDataEngineer ,
    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

    0 comments No comments