Skip to Content.
Sympa Menu

freetds - [freetds] Connecting to an SQL 2005 server in a windows 2000 machine

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Javier Oviedo <joviedo AT plcendesa.com>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: [freetds] Connecting to an SQL 2005 server in a windows 2000 machine
  • Date: Sun, 29 Jan 2006 13:25:22 +0100

Hi all
I triying to connect my linux system (RHEL 3) to an SLQ server in a
windows 2000 machine. I have the following packages installed in my
linux system:

DBI-1.48
freetds-0.63
DBD-Sybase-1.07

The drivers installed are:

DBM, ExampleP, File, Pg, Proxy, Sponge, Sybase, mysql

My freetds conf :

[sqlexpress]
host = X.X.X.X
port = 1433
tds version = 8.0


My DBI->connect:

my $dbh = DBI->connect("DBI:Sybase:server=sqlexpress", $user, $passwd,
{PrintError => 0});


I obtain the following error when I execute my perl script:

DBI 1.48-ithread default trace level set to 0x0/4 (pid 28344)
->
DBI->connect(DBI:Sybase:server=sqlexpress;database=Gateway101SNMP, sa,
****, HASH(0x9551bdc))
-> DBI->install_driver(Sybase) for linux perl=5.008 pid=28344 ruid=0
euid=0
syb_init() -> DBD::Sybase 1.07 initialized
OpenClient version: freetds v0.63
install_driver: DBD::Sybase version 1.07 loaded from
/usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi/DBD/Sybase.pm
New DBI::dr (for DBD::Sybase::dr, parent=, id=)
dbih_setup_handle(DBI::dr=HASH(0x965d420)=>DBI::dr=HASH(0x96ed1e0),
DBD::Sybase::dr, 0, Null!)
dbih_make_com(Null!, 0, DBD::Sybase::dr, 84, 0) thr#9551008
<- install_driver= DBI::dr=HASH(0x965d420)
!! warn: 0 CLEARED by call to connect method
-> connect for DBD::Sybase::dr (DBI::dr=HASH(0x965d420)~0x96ed1e0
'server=sqlexpress;database=Gateway101SNMP' 'sa' **** HASH(0x96eeeb8))
thr#9551008
New DBI::db (for DBD::Sybase::db, parent=DBI::dr=HASH(0x96ed1e0), id=)
dbih_setup_handle(DBI::db=HASH(0x96ed1c8)=>DBI::db=HASH(0x96eeef4),
DBD::Sybase::db, 965d174, Null!)
dbih_make_com(DBI::dr=HASH(0x96ed1e0), 9612f10, DBD::Sybase::db,
2716, 0) thr#9551008
syb_db_login() -> using global CS_LOCALE data
src/tds/login.c: tds_connect: 172.25.97.140:1433: Connection refused
clientmsg_cb -> Server is unavailable or does not exist.
<> DESTROY(DBI::db=HASH(0x96ed1c8)) ignored for outer handle (inner
DBI::db=HASH(0x96eeef4) has ref cnt 1)
-> DESTROY for DBD::Sybase::db (DBI::db=HASH(0x96eeef4)~INNER)
thr#9551008
DESTROY for DBI::db=HASH(0x96eeef4) ignored - handle not
initialised
ERROR: 41 'OpenClient message: LAYER = (0) ORIGIN = (0) SEVERITY
= (78) NUMBER = (41)
Server sqlexpress, database
Message String: Server is unavailable or does not exist.
' (err#0)
<- DESTROY= undef at DBI.pm line 598
dbih_clearcom 0x96ed1c8 (com 0x96ef740, type 2) done.

!! ERROR: 41 'OpenClient message: LAYER = (0) ORIGIN = (0) SEVERITY
= (78) NUMBER = (41)
Server sqlexpress, database
Message String: Server is unavailable or does not exist.
' (err#0)
<- connect= undef at DBI.pm line 598
-> $DBI::errstr (&) FETCH from lasth=HASH
>> DBD::Sybase::dr::errstr
<- $DBI::errstr= 'OpenClient message: LAYER = (0) ORIGIN = (0)
SEVERITY = (78) NUMBER = (41)
Server sqlexpress, database
Message String: Server is unavailable or does not exist.
'
DBI connect('server=sqlexpress;database=Gateway101SNMP','sa',...)
failed: OpenClient message: LAYER = (0) ORIGIN = (0) SEVERITY = (78)
NUMBER = (41)
Server sqlexpress, database
Message String: Server is unavailable or does not exist.

Can't call method "do" on an undefined value at joe.pl line 15.
-- DBI::END
!! ERROR: 41 CLEARED by call to disconnect_all method
-> disconnect_all for DBD::Sybase::dr
(DBI::dr=HASH(0x965d420)~0x96ed1e0) thr#9551008
<- disconnect_all= 1 at DBI.pm line 677 via joe.pl line 0
! -> DESTROY in DBD::_::common for DBD::Sybase::dr
(DBI::dr=HASH(0x96ed1e0)~INNER) thr#9551008
! <- DESTROY= undef during global destruction
dbih_clearcom 0x965d420 (com 0x9612f10, type 1) done.

! <> DESTROY for DBI::dr=HASH(0x965d420) ignored (inner handle gone)

The SQL Server works fine and it listening on 1433 port. I can connect
it with my SQL 2005 Manager and Toad.

Any Ideas?

Thanks in advance!
Regards



  • [freetds] Connecting to an SQL 2005 server in a windows 2000 machine, Javier Oviedo, 01/29/2006

Archive powered by MHonArc 2.6.24.

Top of Page