For the last four years, we have been making an ODBC connection from a shared Linux host to an MS SQL database and it has been working fine. It suddenly stopped last weekend. Unfortunately, it’s the worst timing ever.
We are using freeTDS for our odbc connection and we have updated the TDS version to auto because we had been using 8.0 and I know that version number has changed. We are using a user-level .odbc.ini and have tried every variation we can think of but still get this error:
[unixODBC][FreeTDS][SQL Server]Unable to connect to data source
[myredactedDNSname]
Driver = /usr/lib64/libtdsodbc.so
Server = [redacted]
Port = [not 1433, a special port]
TDS Version = auto
Database = [my db name]
The connection string is in PHP and is
$conn = new PDO("odbc:myredactedDNSname", $username, $password)
The server is running freetds v1.4.16 (and PHP 8x if that matters).
- We have tried versions auto, 7.1, 7.3, 7.4
- We know it is finding the DNS name because if I purposely mistype it,
the error changes. - We Know it is finding the driver because if I use /usr/lib64/libtdsodbc.something instead, it gives a driver not found error.
- We have server techs running the tsql tests because it’s on a portion of the server that I don’t have access to, but we don’t have any results yet. They are not very helpful.
- We ARE able to connect to this server using standard windows ODBC, so it’s not the port/user/password. It’s not connected to even try the user/pwd anyway.
Any ideas about what else I should try??