Ubuntu has unixodbc. To connect to MSSQL or SYBASE, you need to install it first. To compile freetds, you need to install the packages unixodbc, unixodbc-bin, and unixodbc-dev. After installation, you can use tools such as ODBCConfig and DataManger. However, there are no MSSQL and SYBASE drivers. Install freetds. I tried to install freetds from the new version, but it seems that I cannot connect to MSSQL.
Ubuntu has unixodbc. To connect to MSSQL or SYBASE, you need to install it first. To compile freetds, you need to install the packages unixodbc, unixodbc-bin, and unixodbc-dev. After installation, you can use tools such as ODBCConfig and DataManger. However, there are no MSSQL and SYBASE drivers. Install freetds. I tried to install freetds from the new version, but it seems that I cannot connect to MSSQL. I don't know if the server is faulty. To be safe, download freetds source code and compile it yourself.
Download freetds source program freetds-stable.tgz to freetds website, decompress, to unzip the directory to run:
./Configure -- with-tdsver = 8.0 -- enable-msdblib -- enable-dbmfix -- with-gnu-ld -- enable-shared -- enable-static -- with-unixodbc =/usr
The option of this command is critical and you must pay attention to it.
Run after configure is complete
Sudo make
Sudo make install
After running, test:
Tsql-H host-ip-p port-U username-P password
1> the prompt indicates that the connection is successful, and the freetds installation is successful.
Run ODBCConfig and add a driver named TDS to the Drivers page:
After filling out the information, click the above check box to save it.