0

I have this setup:

  • macOS: BigSur 11.6
  • SQLServer
  • openssl version: OpenSSL 1.1.1l 24 Aug 2021
  • cat /etc/odbcinst.ini, as cat /etc/odbc.ini, as cat /usr/local/etc/odbcinst.ini, as /usr/local/etc/odbc.ini - all return this:
[ODBC Driver 17 for SQL Server]
Description=Microsoft ODBC Driver 17 for SQL Server
Driver=/usr/local/lib/libmsodbcsql.17.dylib
UsageCount=20
Trace=yes
TraceFile=/Users/sgalich/fuckingodbclogfile.log
Database=growth
Server=<my_server>
UserName=<my_username>
Password=<my_password>
Port=1433
  • odbcinst -j returns this:
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/sgalich/.odbc.ini
SQLULEN Size.......: 8
SQLLEN Size........: 8
SQLSETPOSIROW Size.: 8
  • cat ~/.bash_profile returns this:
export PATH="/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
export LDFLAGS="-L/usr/local/opt/openssl@1.1/lib"
export CPPFLAGS="-I/usr/local/opt/openssl@1.1/include"
export CPATH="/usr/local/opt/openssl@1.1/include"
export LIBRARY_PATH="/usr/local/opt/openssl@1.1/lib"
export DYLD_LIBRARY_PATH="/usr/local/opt/openssl@1.1/lib"
export DYLD_FALLBACK_LIBRARY_PATH="/usr/local/opt/openssl@1.1/lib"
export PATH="/usr/local/opt/python@3.8/bin:$PATH"
  • and also it worth to mention that jdbc driver works perfectly with these exact server, port, username and password. Also this odbc driver was working for me a week ago with the same connection string until I restarted my laptop.

I reinstalled multiple times the ODBC Driver with this official Microsoft instruction, reinstalled brew and openssl. Also I made symlinks, edited ~/.bash_profile and ~/.bashrc with source ~/.bash_profile, I also exported all of these variables manually, changed openssl@1.1 to openssl@3 and just openssl. All of that didn't help.

I tried all of the suggested solutions from these questions:

I'm still failing to connect the SQL Server and facing this error while running isql -v -k "DRIVER=ODBC Driver 17 for SQL Server;SERVER=<my_server>,1433;UID=<my_username>;PWD=<my_password>" command:

[S1T00][Microsoft][ODBC Driver 17 for SQL Server]Login timeout expired
[08001][Microsoft][ODBC Driver 17 for SQL Server]TCP Provider: Error code 0x2AF9
[08001][Microsoft][ODBC Driver 17 for SQL Server]A network-related or instance-specific error has occurred while establishing a connection to SQL Server. Server is not found or not accessible. Check if instance name is correct and if SQL Server is configured to allow remote connections. For more information see SQL Server Books Online.

Please, help me solve this issue. Any help would be appreciated.

P.S.: Everything began with this issue and as turned out it was an openssl issue. May be I still didn't setup the openssl library correctly?

sgalich
  • 178
  • 3
  • 12

1 Answers1

0

I didn't connect the VPN. Shame on me.

sgalich
  • 178
  • 3
  • 12