Okay,
This time I got DBD::Sybase 0.93 and the Sybase libraries.
Make was fine, it found all the libraries okay
But make test gave:
[root@radius DBD-Sybase-0.93]# make test
PERL_DL_NONLAZY=1 /usr/bin/perl -Iblib/arch -Iblib/lib
-I/usr/lib/perl5/5.00503/i386-linux -I/usr/lib/perl5/5.00503 -e 'use
Test::Harness
qw(&runtests $verbose); $verbose=0; runtests @ARGV;' t/*.t
t/autocommit........Can't call method "do" on an undefined value at
t/autocommit.t line 45.
t/autocommit........dubious
Test returned status 255 (wstat 65280, 0xff00)
DIED. FAILED tests 2-4
Failed 3/4 tests, 25.00% okay
t/base..............ok
t/exec..............DBI->connect(server=president) failed: OpenClient
message: LAYER = (1) ORIGIN = (2) SEVERITY = (6) NUMBER = (151)
Message String: ct_connect(): user api layer: internal Client Library error:
A connection to the server must exist on the connection struc
ture before this routine can be called.
at t/exec.t line 42
.
.
etc.
I looked around the web and there people suggesting this is caused by raw
connectivity problems?!?! - So I telnetted to my MS SQL 2k server.
[root@radius DBD-Sybase-0.93]# telnet president.somedomain.com 1433
Trying 192.168.0.32...
Connected to president.
Escape character is '^]'.
I should probably know TDS to talk here
Connection closed by foreign host.
[root@radius DBD-Sybase-0.93]#
Seems to be fine - that's what I would expect.
The other thing people kept writing about was the interfaces file.
I kept on adding stuff to my interfaces file but it did not appear to
influence the problem.. I now have:
## president on president.somedomain.com
## Services:
## query tcp (1433)
## master tcp (1433)
president
query tcp ether president.somedomain.com 1433
master tcp ether president.somedomain.com 1433
## bmf on president.somedomain.com
## Services:
## query tcp (1433)
bmf
query tcp ether president.somedomain.com 1433
My PWD file contains:
# This file contains optional login id, passwd and server info for the test
# programs:
# You probably don't want to have it lying around after you've made
# sure that everything works OK.
UID=ODBC_User
PWD=xxxxx
SRV=president
So I thought - okay the problem shows itself in t/autocommit.t
So I uncommented the DBI trace line and ran it separately:
[root@radius DBD-Sybase-0.93]# perl t/autocommit.t
1..4
ok 1
DBI 1.20-nothread dispatch trace level set to 2
Note: perl is running without the recommended perl -w option
-> DBI->connect(dbi:Sybase:server=president, ODBC_User, ****,
HASH(0x8145de4))
-> DBI->install_driver(Sybase) for linux perl=5.00503 pid=15119 ruid=0
euid=0
syb_init() -> DBD::Sybase 0.93 initialized
OpenClient version: Sybase Client-Library/10.0.4/P-FREE/Linux
Intel/Linux 2.2.14 i686/1/Tue Mar 7 16:55:23 CET 2000
install_driver: DBD::Sybase version 0.93 loaded from
blib/lib/DBD/Sybase.pm
<- install_driver= DBI::dr=HASH(0x816873c)
-> connect for DBD::Sybase::dr (DBI::dr=HASH(0x816873c)~0x81be31c
'server=president' 'ODBC_User' **** HASH(0x8145db4))
!! ERROR: 151 'OpenClient message: LAYER = (1) ORIGIN = (2) SEVERITY =
(6) NUMBER = (151)
Message String: ct_connect(): user api layer: internal Client Library error:
A connection to the server must exist on the connection struc
ture before this routine can be called.
And it just goes downhill from here...
Anyone have any idea how I should proceed from here?
TIA,
Jamz.
> -----Original Message-----
> From: Michael Peppler [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, 30 August 2001 12:47 AM
> To: [EMAIL PROTECTED]
> Cc: [EMAIL PROTECTED]
> Subject: RE: Perl DBI for SQL Server 7 ?
>
> [EMAIL PROTECTED] writes:
> > On advice from Tim Bunce I have been playing with DBI::Sybase which
when
> > coupled with the FreeTDS libraries is rumoured to be able to connect to
MS
> > SQL directly without a crippleware request broker sitting on the MS SQL
> > server. This also doesn't seem to get through the make test
> > I get:
> >
> > Can't load '../blib/arch/auto/Sybase/DBlib/DBlib.so' for module
> > Sybase::DBlib: ../blib/arch/auto/Sybase/DBlib/DBlib.so
> > : undefined symbol: dbopen at
> > /usr/lib/perl5/5.00503/i386-linux/DynaLoader.pm line 169.
>
> That's not DBD::Sybase - that's Sybase::DBlib, part of the sybperl
> package... dbopen() is defined in libsybdb.a (which freetds also
> provides), but in this case you *may* be running into another problem
> as perl tends to link in -ldb, which *also* defines a dbopen()
> function.
>
> Try building DBD::Sybase instead of sybperl, and see how that goes
> (but use DBD::Sybase 0.91, as 0.93 doesn't build with FreeTDS at the
> moment.
>
> Michael
> --
> Michael Peppler - Data Migrations Inc. - http://www.mbay.net/~mpeppler
> [EMAIL PROTECTED] - [EMAIL PROTECTED]
> International Sybase User Group - http://www.isug.com