I reinstalled the sql-server completely and removed the old /var/opt/mssql/data. I'm still getting the errors: Sqlcmd: Error: Microsoft ODBC Driver 17 for SQL Server : TCP Provider: Error code 0x2746. Sqlcmd: Error: Microsoft ODBC Driver 17 for SQL Server : Client unable to establish connection. I have below packages with "odbc" in name. I'm wondering if any of those could be causing conflicts. hyperqbe@slaro:~$ apt list --installed|grep odbc erlang-odbc/bionic,now 1:20.2.2+dfsg-1ubuntu2 amd64 [zainstalowany,automatycznie] libodbc1/xenial,now 2.3.7 amd64 [zainstalowany,automatycznie] msodbcsql17/xenial,now 17.4.1.1-1 amd64 [zainstalowany,automatycznie] odbcinst/xenial,now 2.3.7 amd64 [zainstalowany,automatycznie] odbcinst1debian2/xenial,now 2.3.7 amd64 [zainstalowany,automatycznie] unixodbc/xenial,now 2.3.7 amd64 [zainstalowany,automatycznie] unixodbc-dev/xenial,now 2.3.7 amd64 [zainstalowany] /etc/obdcinst.ini has one entry: hyperqbe@slaro:~$ cat /etc/odbcinst.ini [ODBC Driver 17 for SQL Server] Description=Microsoft ODBC Driver 17 for SQL Server Driver=/opt/microsoft/msodbcsql17/lib64/libmsodbcsql-17.4.so.1.1 UsageCount=1 I don't have /etc/odbc.ini or ~/.odbc.ini files.