I am finding some problem trying to connect to a SQL Server instance from an Ubuntu machine using sqlcmd.
So I installed sqlcmd as explained here: https://learn.microsoft.com/it-it/sql/linux/sql-server-linux-setup-tools?view=sql-server-ver15#ubuntu
The SQL server seems to be reachable because I can successfully connect to the 1433 port of its IP via Telnet.
Then I tried to connect to one of my database on this server, in this way:
./sqlcmd -S MY_SERVER_IP\ESB_WSO2_USER_DB
Where MY_SERVER_IP is the IP of this server and ESB_WSO2_USER_DB is the name of a database on this server.
The problem is that I am obtaining the following message error as output:
Sqlcmd: Error: Microsoft ODBC Driver 17 for SQL Server : Login timeout expired.
Sqlcmd: Error: Microsoft ODBC Driver 17 for SQL Server : TCP Provider: Error code 0x2AFA.
Sqlcmd: Error: 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.
So what could be the problem? Is it something that could be related to my sqlcmd installation (maybe some missconfiguration) or something related to my connection string? or something related to the SQL Server database?
The message says that maybe the SQL Server maybe is not allowing external connection but...if so...why Telnet connection works fine?