I am getting a error when trying to use sqlcmd
against my SQL Server 2016 database.
I can successfully get a connection to on port 1433
(venv) xxxx@ip-xxx-xx-xx-xxx:/etc$ telnet xx.xxx.xxx.202 1433
Trying xx.xxx.xxx.202...
Connected to xx.xxx.xxx.202.
Escape character is '^]'.
The server is answering however, when I try the following:
(venv) xxxx@ip-xxx-xx-xx-xxx:/etc$ sqlcmd -S xx.xxx.xxx.202 -U sa -P password
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 am successful using other OBDC drivers such as FreeTDS using isql, but FreeTDS driver with sqlcmd yeilds 'Unsupported driver message'.
Anyone have similiar issues or thoughts about how to resolve?
Update
Client Info:
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 20.04.2 LTS
Release: 20.04
Codename: focal
ODBCinst.ini:
[SQL Server]
Description=Microsoft ODBC Driver 17 for SQL Server
Driver=/opt/microsoft/msodbcsql17/lib64/libmsodbcsql-17.7.so.2.1
UsageCount=1
[FreeTDS]
Description=v0.91 with protocol v7.2
Driver=/usr/lib/x86_64-linux-gnu/odbc/libtdsodbc.so
[ODBC Driver 17 for SQL Server]
Description=Microsoft ODBC Driver 17 for SQL Server
Driver=/opt/microsoft/msodbcsql17/lib64/libmsodbcsql-17.7.so.2.1
UsageCount=1
SQL Server Version
Microsoft SQL Server 2016 (SP1-CU8) (KB4077064) - 13.0.4474.0 (X64)
Feb 24 2018 13:53:17 Copyright (c) Microsoft Corporation
Enterprise Edition: Core-based Licensing (64-bit)
on Windows Server 2012 R2 Standard 6.3 <X64> (Build 9600: ) (Hypervisor)