Discussion:
[freetds] FreeTDS Digest, Vol 119, Issue 6
Sankar G
2012-12-14 07:39:07 UTC
Permalink
Hi,

please can any one help me to get out of this problem
Send FreeTDS mailing list submissions to
freetds at lists.ibiblio.org
To subscribe or unsubscribe via the World Wide Web, visit
http://lists.ibiblio.org/mailman/listinfo/freetds
or, via email, send a message with subject or body 'help' to
freetds-request at lists.ibiblio.org
You can reach the person managing the list at
freetds-owner at lists.ibiblio.org
When replying, please edit your Subject line so it is more specific
than "Re: Contents of FreeTDS digest..."
1. [unixODBC][FreeTDS][SQL Server]Unable to connect to data
source (SQL-08001) (Sankar G)
----------------------------------------------------------------------
Message: 1
Date: Thu, 13 Dec 2012 18:34:49 +0530
From: Sankar G <geoinnovate at gmail.com>
Subject: [freetds] [unixODBC][FreeTDS][SQL Server]Unable to connect to
data source (SQL-08001)
To: freetds at lists.ibiblio.org
<CAJkiSB4+QTikp=
BC5q104pAiT+Mx4RW2xAa8M-HONxyV48T_Rg at mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1
Hi
I am getting some errors when i am trying to connect MS SqlServer using
FreeTDS,
unixODBC and DBD::ODBC.
My odbcinst.ini file
[FreeTDS]
Description = TDS driver (Sysbase/MS SQL)
Driver = /usr/local/freetds/lib/libtdsodbc.so
Setup = /usr/local/freetds/lib/libtdsodbc.so UsageCount = 1
My odbc.ini file
[SERVER]
Driver = FreeTDS
Description = ODBC connection via FreeTDS
ServerName = SERVER
My freetds.conf file
# A typical Microsoft server
[SERVER]
host = xxx.xxx.xxx.xxx
port = 1433
tds version = 7.2
my perl file
$ perl DB_Test.pl
$dsn = "dbi:ODBC:DRIVER={FreeTDS};Server=$server;database=$database;";
$dbh = DBI->connect("$dsn","$user","$password") or die "\n$DBI::errstr\n";
Error
DBI
connect('DRIVER={FreeTDS};Server=xxx.xxx.xxx.xxx;database=xxxxx;','xxxxxx',...)
failed: [unixODBC][FreeTDS][SQL Server]Unable to connect to data source
(SQL-08001) at DB_Test.pl line 14
[unixODBC][FreeTDS][SQL Server]Unable to connect to data source (SQL-08001)
when i try to connect using osql i am getting this error
$ sudo TDSVER=7.2 osql -S SERVER -U username -P password
checking shared odbc libraries linked to isql for default directories...
trying /usr ... no
trying /loc ... no
trying /tmp/sql.log ... no
trying /home ... no
trying /.odbc.ini ... no
trying /usr/local/etc ... OK
checking odbc.ini files
reading /home/perlzuser/.odbc.ini
[SERVER] not found in /home/perlzuser/.odbc.ini
reading /usr/local/etc/odbc.ini
[SERVER] found in /usr/local/etc/odbc.ini
[SERVER]
Driver = FreeTDS
Description = ODBC connection via FreeTDS
ServerName = SERVER
looking for driver for DSN [SERVER] in /usr/local/etc/odbc.ini
found driver line: " Driver = FreeTDS"
driver "FreeTDS" found for [SERVER] in odbc.ini
found driver named "FreeTDS"
"FreeTDS" is not an executable file
looking for entry named [FreeTDS] in /usr/local/etc/odbcinst.ini
found driver line: " Driver = /usr/local/freetds/lib/libtdsodbc.so"
found driver /usr/local/freetds/lib/libtdsodbc.so for [FreeTDS] in
odbcinst.ini
/usr/local/freetds/lib/libtdsodbc.so is an executable file
Using ODBC-Combined strategy
DSN [SERVER] has servername "" (from /usr/local/etc/odbc.ini)
Please I need help to connect MSSQL Server from my perl program using
FreeTDS
and DBD::ODBC
Thanks
------------------------------
_______________________________________________
FreeTDS mailing list
FreeTDS at lists.ibiblio.org
http://lists.ibiblio.org/mailman/listinfo/freetds
End of FreeTDS Digest, Vol 119, Issue 6
***************************************
Sankar G
2012-12-14 12:00:43 UTC
Permalink
Hi

I Googled a lot for this, But didn't get any solution.

I am using ubuntu 12.04 LTS
sql server 2008 (on my Remote machine)
freetds and unixodbc latest version

I have configured correctly as per the user-guide, But still getting error.

Please help me to get out of this.

Thanks
Hi,
Google is your friend.
The log you posted is clear enough.
Thank you.
On Thu, Dec 13, 2012 at 5:04 AM, Sankar G <geoinnovate <at> gmail.com>
Hi
I am getting some errors when i am trying to connect MS SqlServer using
FreeTDS,
unixODBC and DBD::ODBC.
My odbcinst.ini file
[FreeTDS]
Description = TDS driver (Sysbase/MS SQL)
Driver = /usr/local/freetds/lib/libtdsodbc.so
Setup = /usr/local/freetds/lib/libtdsodbc.so UsageCount = 1
My odbc.ini file
[SERVER]
Driver = FreeTDS
Description = ODBC connection via FreeTDS
ServerName = SERVER
My freetds.conf file
# A typical Microsoft server
[SERVER]
host = xxx.xxx.xxx.xxx
port = 1433
tds version = 7.2
my perl file
$ perl DB_Test.pl
$dsn = "dbi:ODBC:DRIVER={FreeTDS};Server=$server;database=$database;";
$dbh = DBI->connect("$dsn","$user","$password") or die
"\n$DBI::errstr\n";
Error
DBI
connect('DRIVER={FreeTDS};Server=xxx.xxx.xxx.xxx;database=xxxxx;','xxxxxx',...)
failed: [unixODBC][FreeTDS][SQL Server]Unable to connect to data source
(SQL-08001) at DB_Test.pl line 14
[unixODBC][FreeTDS][SQL Server]Unable to connect to data source (SQL-08001)
when i try to connect using osql i am getting this error
$ sudo TDSVER=7.2 osql -S SERVER -U username -P password
checking shared odbc libraries linked to isql for default directories...
trying /usr ... no
trying /loc ... no
trying /tmp/sql.log ... no
trying /home ... no
trying /.odbc.ini ... no
trying /usr/local/etc ... OK
checking odbc.ini files
reading /home/perlzuser/.odbc.ini
[SERVER] not found in /home/perlzuser/.odbc.ini
reading /usr/local/etc/odbc.ini
[SERVER] found in /usr/local/etc/odbc.ini
[SERVER]
Driver = FreeTDS
Description = ODBC connection via FreeTDS
ServerName = SERVER
looking for driver for DSN [SERVER] in /usr/local/etc/odbc.ini
found driver line: " Driver = FreeTDS"
driver "FreeTDS" found for [SERVER] in odbc.ini
found driver named "FreeTDS"
"FreeTDS" is not an executable file
looking for entry named [FreeTDS] in /usr/local/etc/odbcinst.ini
found driver line: " Driver = /usr/local/freetds/lib/libtdsodbc.so"
found driver /usr/local/freetds/lib/libtdsodbc.so for [FreeTDS] in
odbcinst.ini
/usr/local/freetds/lib/libtdsodbc.so is an executable file
Using ODBC-Combined strategy
DSN [SERVER] has servername "" (from /usr/local/etc/odbc.ini)
Please I need help to connect MSSQL Server from my perl program using
FreeTDS
and DBD::ODBC
Thanks
_______________________________________________
FreeTDS mailing list
FreeTDS <at> lists.ibiblio.org
http://lists.ibiblio.org/mailman/listinfo/freetds
Sankar G
2012-12-14 12:04:08 UTC
Permalink
Hi

I Googled a lot for this, But didn't get any solution.

I am using ubuntu 12.04 LTS
sql server 2008 (on my Remote machine)
freetds and unixodbc latest version

I have configured correctly as per the user-guide, But still getting error.

Please help me to get out of this.

Thanks
Hi,
Google is your friend.
The log you posted is clear enough.
Thank you.
On Thu, Dec 13, 2012 at 5:04 AM, Sankar G <geoinnovate <at> gmail.com>
Hi
I am getting some errors when i am trying to connect MS SqlServer using
FreeTDS,
unixODBC and DBD::ODBC.
My odbcinst.ini file
[FreeTDS]
Description = TDS driver (Sysbase/MS SQL)
Driver = /usr/local/freetds/lib/libtdsodbc.so
Setup = /usr/local/freetds/lib/libtdsodbc.so UsageCount = 1
My odbc.ini file
[SERVER]
Driver = FreeTDS
Description = ODBC connection via FreeTDS
ServerName = SERVER
My freetds.conf file
# A typical Microsoft server
[SERVER]
host = xxx.xxx.xxx.xxx
port = 1433
tds version = 7.2
my perl file
$ perl DB_Test.pl
$dsn = "dbi:ODBC:DRIVER={FreeTDS};Server=$server;database=$database;";
$dbh = DBI->connect("$dsn","$user","$password") or die
"\n$DBI::errstr\n";
Error
DBI
connect('DRIVER={FreeTDS};Server=xxx.xxx.xxx.xxx;database=xxxxx;','xxxxxx',...)
failed: [unixODBC][FreeTDS][SQL Server]Unable to connect to data source
(SQL-08001) at DB_Test.pl line 14
[unixODBC][FreeTDS][SQL Server]Unable to connect to data source
(SQL-08001)
when i try to connect using osql i am getting this error
$ sudo TDSVER=7.2 osql -S SERVER -U username -P password
checking shared odbc libraries linked to isql for default directories...
trying /usr ... no
trying /loc ... no
trying /tmp/sql.log ... no
trying /home ... no
trying /.odbc.ini ... no
trying /usr/local/etc ... OK
checking odbc.ini files
reading /home*/perlzuser/*.odbc.ini
[SERVER] not found in /home*/perlzuser/*.odbc.ini
reading /usr/local/etc/odbc.ini
[SERVER] found in /usr/local/etc/odbc.ini
[SERVER]
Driver = FreeTDS
Description = ODBC connection via FreeTDS
ServerName = SERVER
looking for driver for DSN [SERVER] in /usr/local/etc/odbc.ini
found driver line: " Driver = FreeTDS"
driver "FreeTDS" found for [SERVER] in odbc.ini
found driver named "FreeTDS"
"FreeTDS" is not an executable file
looking for entry named [FreeTDS] in /usr/local/etc/odbcinst.ini
found driver line: " Driver = /usr/local/freetds/lib/libtdsodbc.so"
found driver /usr/local/freetds/lib/libtdsodbc.so for [FreeTDS] in
odbcinst.ini
/usr/local/freetds/lib/libtdsodbc.so is an executable file
Using ODBC-Combined strategy
DSN [SERVER] has servername "" (from /usr/local/etc/odbc.ini)
Please I need help to connect MSSQL Server from my perl program using
FreeTDS
and DBD::ODBC
Thanks
_______________________________________________
FreeTDS mailing list
FreeTDS <at> lists.ibiblio.org
http://lists.ibiblio.org/mailman/listinfo/freetds
Loading...