System information

On Ubuntu 10.10, the socket location is /var/run/mysqld/mysqld.sock.
Configuring ODBC for Microsoft SQL
Connecting to Microsoft SQL (MS SQL) is similar to connecting to either MySQL or
PostgreSQL, as we’ve previously discussed. The configuration of MS SQL is beyond
the scope of this book, but the following information will get your Asterisk box con-
figured to connect to your MS SQL database once you’ve enabled the appropriate per-
missions on your database.
To connect to MS SQL, you need to install the FreeTDS drivers using the package
manager (or by compiling via the source files available at http://www.freetds.org).
On CentOS:
$ sudo yum install freetds
On Ubuntu:
$ sudo apt-get install freetds
After installing the drivers, you need to configure the /etc/odbcinst.ini file, which tells
the system where the driver files are located.
Insert the following text into the /etc/odbcinst.ini file with your favorite text editor or
with the following command:
$ sudo cat > /etc/odbcinst.ini
[FreeTDS]
Description = ODBC for Microsoft SQL
Driver = /usr/lib/libtdsodbc.so
UsageCount = 1
Threading = 2
Ctrl
+ D
If you compiled via source, the files may be located in /usr/local/lib/ or
(if you compiled on a 64-bit system) /usr/local/lib64/.
Verify that the system is able to see the driver by running the following command. It
should return the label name FreeTDS if all is well:
$ odbcinst -q -d
[FreeTDS]
350 | Chapter 16:Relational Database Integration