http://www.perlmonks.org?node_id=142898


in reply to What is required to use Perl on Solaris to connect to MS-SQL?

You don't state what version of SQL Server you're using. In general though -- if SQL Server is configured to listen for connections on a port (as opposed to something like named pipes), you should be able to get it to work.

One method works is to install the latest version of FreeTDS (which is currently 0.53). Then edit /etc/freetds.conf (or where ever the installation put it) and insert the settings that correspond to your database (hostname, username, password, etc).

Then, install DBD::Sybase, and you should be good to go. Just be sure to insert the following code at the top of all your scripts using the database:
BEGIN { $ENV{SYBASE} = '/usr'; }
Substitute /usr for the actual prefix FreeTDS was installed under on your system.

Without this code, or when using incorrect parameters to send to the database, it often just segfaults. The FreeTDS and DBD::Sybase docs should be able to help you get the correct parameters to use though. Good luck!