Open hellorohitsharma opened 5 months ago
Make sure the managed identity is enabled on the VM, and that the server is reachable from it. The "timeout expired" suggests it couldn't connect to the server.
And for the record, "PORT" is NOT a valid connection string option, nor is "Connection Timeout". Where are you getting that from? Here is the list that the driver supports: https://learn.microsoft.com/en-us/sql/connect/odbc/dsn-connection-string-attribute?view=sql-server-ver16
I am running my Python code in Synapse Jupiter notebooks on Azure Synapse. I am trying to connect to Synapse DB with pyodbc library using Managed identity. I am getting Login Timeout Error.
To diagnose, we usually need to know the following, including version numbers. On Windows, be sure to specify 32-bit Python or 64-bit: I
Code snippet: driver='{ODBC Driver 17 for SQL Server}'
try:
except Exception as E: print(f"Error occurred while establishing connections with Synapse DB", E)
Error: ('HYT00', '[HYT00] [Microsoft][ODBC Driver 17 for SQL Server]Login timeout expired (0) (SQLDriverConnect)')
Please help me on this.