Sql-server – MS SQL Server 2000 ODBC driver for Linux

freetdslinuxodbcsql serversql-server-2000

Microsoft has official ODBC drivers for MS SQL Server, for Linux. Great! Nice installation instructions for all the major distros, too.

Unfortunately, their ODBC drivers, going back to the oldest version I can find only support SQL Server 2005 and newer:

Native Data Access APIs – ODBC and OLE DB – for SQL Server 2005 and later.

I need to connect to a very old SQL Server (2000):

SELECT @@VERSION
→
Microsoft SQL Server  2000 - 8.00.2039 (Intel X86) 
       May  3 2005 23:18:38 
       Copyright (c) 1988-2003 Microsoft Corporation
       Enterprise Edition on Windows NT 5.2 (Build 3790: Service Pack 2)

I've confirmed that the v13 driver does not work:

$ sqlcmd -U XXXX -S 10.1.2.3
Password: 
Sqlcmd: Error: Microsoft ODBC Driver 13 for SQL Server : ODBC Driver 13 for SQL Server does not support connections to SQL Server 2000 or earlier versions..
Sqlcmd: Error: Microsoft ODBC Driver 13 for SQL Server : Client unable to establish connection.


Is there an official MS SQL ODBC driver that will run on a modern 64-bit Linux and connect to SQL Server 2000?

Or do I need to go to third party drivers like the open-source FreeTDS?

Best Answer

@Dan, this is by design. SQL Server 2005 is not longer supported. Newly released client drivers support SQL Server 2005+.

That said, can you try this?

wget https://gallery.technet.microsoft.com/scriptcenter/SQLCMD-and-BCP-for-Ubuntu-c88a28cc/file/142121/1/Ubuntu%2014.04%20MSFT%20ODBC%20Driver.sh
sudo bash Ubuntu\ 14.04\ MSFT\ ODBC\ Driver.sh 
sqlcmd –S yourServerName.database.windows.net – U yourUsername – P yourPassword

These steps install the older version (ODBC Driver v11).