microsoft / homebrew-mssql-release

Other
92 stars 31 forks source link

Could not connect to Azure SQL Database on version 17.8.1.1 #70

Closed RohitMundhra closed 2 years ago

RohitMundhra commented 2 years ago

I started facing this issue when I brew updated my system.

When I try to connect to sql server: cnxn = pyodbc.connect('DRIVER='+driver+';SERVER=127.0.0.1,1433;DATABASE='+database+';UID='+username+';PWD='+ password)

I get the following error: pyodbc.OperationalError: ('08001', '[08001] [Microsoft][ODBC Driver 17 for SQL Server]Client unable to establish connection (0) (SQLDriverConnect)')

When I run : isql -v -k "{ODBC Driver 17 for SQL Server};SERVER=127.0.0.1,1433;DATABASE=test;UID=sa;PWD=" I get [IM002][unixODBC][Driver Manager]Data source name not found and no default driver specified [ISQL]ERROR: Could not SQLDriverConnect

odbcinst -j unixODBC 2.3.9 DRIVERS............: /usr/local/etc/odbcinst.ini SYSTEM DATA SOURCES: /usr/local/etc/odbc.ini FILE DATA SOURCES..: /usr/local/etc/ODBCDataSources USER DATA SOURCES..: /Users/r0m086g/.odbc.ini SQLULEN Size.......: 8 SQLLEN Size........: 8 SQLSETPOSIROW Size.: 8

Please help. Trying to resolve this issue for past two weeks but unable to

v-chojas commented 2 years ago

127.0.0.1 is definitely not Azure... and please do not cross-post issues before getting a redirect. https://github.com/mkleehammer/pyodbc/issues/1032