Use DBI + Sybase driver
It sounds like a hack, because it is. We're using sybase driver to connect to MS SQL server. Apparently, it works, and that's all that it matters. The connection string for sybase looks like this: DBI:Sybase:server=server.hostname.com
Use DBI + ODBC + FreeTDS driver
This setup basically creates a Datasource name (DSN) for the connection in the driver configuration file. Thanks to this blog, which provided step to step guide to set it up. Though it is intended for php script, I found it working for perl module as well.
sudo cpan DBD::ODBC
sudo apt-get install unixodbc-dev tdsodbc
Install FreeTDS by downloading here if it's not already installed.
Edit the TDS config file to add a DSN /etc/freetds.conf
[MSSQL]
host = server host name or IP
port = 1433
tds version = 8.0
host = server host name or IP
port = 1433
tds version = 8.0
Edit /etc/odbcinst.ini
[FreeTDS]
Description = FreeTDS driver
Driver = /usr//lib/odbc/libtdsodbc.so
Setup=/usr/lib/odbc/libtdsS.so
FileUsage = 1
UsageCount = 1
Edit /etc/odbc.ini
Description = MS SQL Server
Driver = /usr/lib/libtdsodbc.so
Server = server name or ip
UID = devuser
PWD = devpass
ReadOnly = No
Port = 1433
The connection string for perl module would look like this: dbi:ODBC:MSSQL
I'll probably add some sample code later.
I'll probably add some sample code later.