I have created an Azure function (in Python). Within that function I want to do a query from a MS SQL server. I make a connection with the following code:
server = 'myserver,port_nr'
database = 'Application'
Authentication='ActiveDirectoryMsi'
driver= '{ODBC Driver 17 for SQL Server}'
conn_sleep = pyodbc.connect('DRIVER='+driver+
';SERVER='+server+
';PORT=1433;DATABASE='+database+
';AUTHENTICATION='+Authentication
)
It gives me this error: Result: Failure Exception: OperationalError: ('HYT00', '[HYT00] [Microsoft][ODBC Driver 17 for SQL Server]Login timeout expired (0) (SQLDriverConnect)') Stack: File "/azure-functions-host/workers/python/3.9/LINUX/X64/azure_functions_worker/dispatcher.py",
Does someone has a suggestion to solve it?
Kind regards,
Kaat