Microsoft SQL, only one of 2 allows linux client connections

This is a bit weird. I have installed two instances of the SQL Server 2016. One is on my laptop (windows 10) and the other one is on a VPS (Windows Server 2012), on my development server in the next room. On the same server there is another VPS with Centos 7 with odbc that is trying to connect to both SQL instances.

Connection to my laptop's one is successful using sqlcmd -S .. -P -Q "query" on the other hand connecting to the windows server returns error

Sqlcmd: Error: Microsoft ODBC Driver 13 for SQL Server : Login timeout expired.
Sqlcmd: Error: Microsoft ODBC Driver 13 for SQL Server : TCP Provider: Error code 0x102.
Sqlcmd: Error: Microsoft ODBC Driver 13 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..

When I try to connect to the windows server using my laptop's SQL client it is all smooth, no timeouts no nothing.

I have disabled all firewalls (both windows machines /vps & laptop/). I am just wondering what from the Windows Server 2012 could be blocking the linux connections making them to timeout and meanwhile allowing the Windows ones..?

1 Answer

It sounds to me like you don't have TCP connections enabled to your SQL server:(v=sql.110).aspxThe default configuration is to not allow TCP connections IIRC.

If it's SQL Express, you may also need to enable remote connections:

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like