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

perlraj has asked for the wisdom of the Perl Monks concerning the following question:

I just installed the ODBC driver in the Ubuntu, but still I am facing issues while connecting the database from Perl. Here is the description on what I have done in my machine.

I installed the MSSQL Driver and Unix ODBC from easysoft website. The path details in my machine follows:

ODBC Installed Path:- user/local/easysoft/unixodbc

Data Source and Driver path: user/local/etc Sample Code:

#!/usr/bin/perl use strict; use DBI; my $dsn="DBI:ODBC:DRIVER={SQL Server};Server=xxx.xxx.xxx.xxx,1433;data +base=DB_name"; my $dbh = DBI->connect($dsn, "username", "password" ,{AutoCommit => 1} +) or die $DBI::errstr;

Error: DBI connect('DRIVER={SQL Server};Server=xxx.xxx.xxx.xxx,1433;database=DB_name','username',...) failed: unixODBCDriver Manager Can't open lib 'SQL Server' : file not found (SQL-01000) at sample.pl line 5 unixODBCDriver ManagerCan't open lib 'SQL Server' : file not found (SQL-01000) at sample.pl line 5. Title: Need help in connecting MSSQL database from Linux OS (Ubuntu)