Debian Linux as a Microsoft SQL Server client
Par Pierrick, lundi 22 octobre 2007 à 22:09 / categorie: GNU/linux / tags: / #104 / rss

We're using Debian Etch (with GNU/Linux) as a server at Talend office. We need to reach a remote Microsoft SQL Server database. The first step is to perform a select query in the command line.
We need to install FreeTDS: FreeTDS is a set of libraries for Unix and Linux that allows your programs to natively talk to Microsoft SQL Server and Sybase databases.
. We have to define an "interface" for the Microsoft SQL Server in the FreeTDS "interfaces" file. At the end of the line,w use sqsh, a command line client for Sybase and Microsoft SQL Server.
$ sudo apt-get install freetds-dev sqsh $ vi /etc/freetds/freetds.conf
# talend alias is bound to a MS SQL Server 2000
[talend]
host = talend-dbms
port = 1433
tds version = 8.0
$ sqsh -Uroot -P******* -Stalend [...] 1> select count(*) from sales; 2> \go ----------- 1000 (1 row affected) 1> quit
Commentaires
Aucun commentaire pour le moment.
Ajouter un commentaire
Les commentaires pour ce billet sont fermés.