cannot connect to remote sql express server 2012 from ubuntu 22.04

195 Views Asked by At

I recently installed ubuntu 22.04
I then installed openssl, unixodbc-dev, freetds, and mssqlodbc18 using apt
When I try to connect to a remote SQL Server I get anerror. It is SQL Server Express 2012.

Error 20002 (severity 9):
Adaptive Server connection failed

I changed the FreeTds.conf file to include as below

[sqlserver]
        host = XXX.XXX.XXX.X
        port = 1433
        tds version = 7.4
        instance=XX_XXXX

I also reduced the CipherString to SECLEVEL=0 in the openssl.cnf file. however, when I try to connect it gives me the same error.

If I telnet to the server on that port I can connect.

The same problem persists when I use pyodbc from python to connect and execute a query on the SQL Server instance.

0

There are 0 best solutions below