PEPPLER.ORG
Michael Peppler
Sybase Consulting
Menu
Home
Sybase on Linux
Install Guide for Sybase on Linux
General Sybase Resources
General Perl Resources
Freeware
Sybperl
Sybase::Simple
DBD::Sybase
BCP Tool
Bug Tracker
Mailing List Archive
Downloads Directory
FAQs
Sybase on Linux FAQ
Sybperl FAQ
Personal
Michael Peppler's resume

sybperl-l Archive

Up    Prev    Next    

From: "Sean Maley" <s dot maley at themunicenter dot com>
Subject: RE: Sybase upgrade kills DBD 1.04 installation
Date: Dec 18 2007 9:28PM

See details in original message.

This looks like a post I found:
  http://www.peppler.org/archive/sybperl-l/2006/3/8397.html

If LD_LIBRARY_PATH is set to the old OCS-12_5/lib directory
(P-EBF11356/DRV.12.5.1), everything is fine again.  Set LD_LIBRARY_PATH
to the new OCS-12_5/lib (P-EBF13138 ESD #12/DRV.12.5.1.4) and it breaks
DBD::Sybase again (isql, etc are all fine either way).  Two other
servers with Solaris and ESD #12/DRV.12.5.1.4 work without a problem.

Okay:
SunOS devhost 5.9 Generic_118558-11 sun4u sparc SUNW,Ultra-Enterprise
(perl, v5.8.0)
SunOS stagehost 5.9 Generic_118558-11 sun4u sparc SUNW,Ultra-80 (perl,
v5.8.0)

Not Okay:
SunOS drhost 5.9 Generic_118558-11 sun4us sparc FJSV,GPUZC-M (perl,
v5.8.3)

Could this be a perl version issue?  Platform?  Again, 'make test' fails
for other versions of DBD::Sybase.


-Sean.
-----Original Message-----
Sean Maley wrote:
> Michael,
>  
> We seem to be hitting an odd snag after upgrading our Sybase 
> installation.  Connecting to the new server configuration is no 
> problem when we execute isql.  However, we can no longer connect via
DBD::Sybase.
>  
> The message we get: "ct_connect(): network packet layer: internal net 
> library error: There was an error encountered while establishing the 
> connection."
>  
> Old version:
> Adaptive Server Enterprise/12.5.1/EBF 11420/P/Sun_svr4/OS 
> 5.8/ase1251/1823/32-bit/FBO/Wed Sep 17 07:18:24 2003 Sybase CTISQL 
> Utility/12.5.1 ASE Edition/P-EBF11356/DRV.12.5.1/SPARC/Solaris 
> 2.8/BUILD1251-004/OPT/Mon Aug 11 09:34:39 2003
>  
> New version:
> Adaptive Server Enterprise/12.5.4/EBF 14649 ESD#6/P/Sun_svr4/OS 
> 5.8/ase1254/2079/32-bit/FBO/Wed Jul 11 10:25:20 2007 Sybase CTISQL 
> Utility/12.5.1/P-EBF13138 ESD #12/DRV.12.5.1.4/SPARC/Solaris 
> 2.8/BUILD1251-045/OPT/Thu Jan 12 20:10:52 2006
>  
> Our Solaris version:
> SunOS drhost 5.9 Generic_118558-11 sun4us sparc FJSV,GPUZC-M
>  
> We were wondering if you've seen this before.  It looks very similar 
> to some issues I see in your archive, but I don't see any solutions.  
> We tried a new version of DBD for kicks with the same result.  We can 
> reproduce the error with 'make test', but the error doesn't seem 
> version specific.
>  
> Thank you for your time.
>  
>  
> -Sean.
>  
> ========================
> Script
> ========================
> #!/usr/bin/perl
>  
> use DBI;
> DBI->trace(6);
>  
> my $h = DBI->connect( "dbi:Sybase:server=SYBDB", 'dbuser', 'uspass', {

> }
> ) or die "Can't connect: $DBI::errstr\n";
>  
> __END__
> ========================
> Output
> ========================
>     DBI 1.38-nothread dispatch trace level set to 6
>     Note: perl is running without the recommended perl -w option
>     -> DBI->connect(dbi:Sybase:server=SYBDB, dbuser, ****,
HASH(0x150a20))
>     -> DBI->install_driver(Sybase) for solaris perl=5.008003 pid=16607
> ruid=1443 euid=1443
>     syb_init() -> DBD::Sybase 1.04 initialized
>     OpenClient version: Sybase Client-Library/12.5.1/P-EBF13138 ESD 
> #12/DRV.12.5.1.4/SPARC/Solaris 2.8/BUILD1251-045/OPT/Thu Jan 12 
> 20:01:42
> 2006
>        install_driver: DBD::Sybase version 1.04 loaded from 
> /usr/local/lib/perl5/site_perl/5.8.3/sun4-solaris/DBD/Sybase.pm
>     New DBI::dr (for DBD::Sybase::dr, parent=, id=)
>     dbih_setup_handle(DBI::dr=HASH(0x230aa0)=>DBI::dr=HASH(0x2865b4),
> DBD::Sybase::dr, 0, Null!)
>     dbih_make_com(Null!, 0, DBD::Sybase::dr, 84, 0) thr#0
>     dbih_setup_attrib(DBI::dr=HASH(0x2865b4), Err, Null!)
> SCALAR(0x1daae0) (already defined)
>     dbih_setup_attrib(DBI::dr=HASH(0x2865b4), State, Null!)
> SCALAR(0x152c14) (already defined)
>     dbih_setup_attrib(DBI::dr=HASH(0x2865b4), Errstr, Null!)
> SCALAR(0x152c38) (already defined)
>     dbih_setup_attrib(DBI::dr=HASH(0x2865b4), TraceLevel, Null!) 0 
> (already defined)
>     dbih_setup_attrib(DBI::dr=HASH(0x2865b4), FetchHashKeyName, Null!)

> 'NAME' (already defined)
>     <- install_driver= DBI::dr=HASH(0x230aa0)
>     -> connect for DBD::Sybase::dr (DBI::dr=HASH(0x230aa0)~0x2865b4 
> 'server=SYBDB' 'dbuser' **** HASH(0x2c0448))
>     New DBI::db (for DBD::Sybase::db, parent=DBI::dr=HASH(0x2865b4),
id=)
>     dbih_setup_handle(DBI::db=HASH(0x1fb958)=>DBI::db=HASH(0x2c0478),
> DBD::Sybase::db, 2307f4, Null!)
>     dbih_make_com(DBI::dr=HASH(0x2865b4), 160528, DBD::Sybase::db, 
> 2428, 0) thr#0
>     dbih_setup_attrib(DBI::db=HASH(0x2c0478), Err,
> DBI::dr=HASH(0x2865b4)) SCALAR(0x2362a0) (already defined)
>     dbih_setup_attrib(DBI::db=HASH(0x2c0478), State,
> DBI::dr=HASH(0x2865b4)) SCALAR(0x236300) (already defined)
>     dbih_setup_attrib(DBI::db=HASH(0x2c0478), Errstr,
> DBI::dr=HASH(0x2865b4)) SCALAR(0x2362d0) (already defined)
>     dbih_setup_attrib(DBI::db=HASH(0x2c0478), TraceLevel,
> DBI::dr=HASH(0x2865b4)) 0 (already defined)
>     dbih_setup_attrib(DBI::db=HASH(0x2c0478), FetchHashKeyName,
> DBI::dr=HASH(0x2865b4)) 'NAME' (already defined)
>     dbih_setup_attrib(DBI::db=HASH(0x2c0478), HandleError,
> DBI::dr=HASH(0x2865b4)) undef (not defined)
>     clientmsg_cb -> ct_connect(): network packet layer: internal net 
> library error: There was an error encountered while establishing the 
> connection.
>     <> DESTROY ignored for outer handle DBI::db=HASH(0x1fb958) (inner
> DBI::db=HASH(0x2c0478))
>     -> DESTROY for DBD::Sybase::db (DBI::db=HASH(0x2c0478)~INNER)
>          DESTROY for DBI::db=HASH(0x2c0478) ignored - handle not
initialised
>        error: 4 'OpenClient message: LAYER = (5) ORIGIN = (3) SEVERITY

> = (5) NUMBER = (4)
> Server SYBDB, database
> Message String: ct_connect(): network packet layer: internal net
library
> error: There was an error encountered while establishing the
connection.
> '
>     <- DESTROY= undef at
> /usr/local/lib/perl5/site_perl/5.8.3/sun4-solaris/DBI.pm line 585
>     DESTROY (dbih_clearcom) (dbh 0x1fb958 0x0, com 0x2c0bd8, imp
> DBD::Sybase::db):
>        FLAGS 0x11: COMSET Warn
>        PARENT DBI::dr=HASH(0x2865b4)
>        KIDS 0 (0 Active)
>        IMP_DATA undef
>     dbih_clearcom 0x1fb958 (com 0x2c0bd8, type 2) done.
>  
>     !! ERROR: 4 'OpenClient message: LAYER = (5) ORIGIN = (3) SEVERITY

> = (5) NUMBER = (4)
> Server SYBDB, database
> Message String: ct_connect(): network packet layer: internal net
library
> error: There was an error encountered while establishing the
connection.
> '
>     <- connect= undef at
> /usr/local/lib/perl5/site_perl/5.8.3/sun4-solaris/DBI.pm line 585
>     -> errstr in DBD::_::common for DBD::Sybase::dr
> (DBI::dr=HASH(0x230aa0)~0x2865b4)
>        error: 4 'OpenClient message: LAYER = (5) ORIGIN = (3) SEVERITY

> = (5) NUMBER = (4)
> Server SYBDB, database
> Message String: ct_connect(): network packet layer: internal net
library
> error: There was an error encountered while establishing the
connection.
> '
>     <- errstr= 'OpenClient message: LAYER = (5) ORIGIN = (3) SEVERITY 
> = (5) NUMBER = (4)
> Server SYBDB, database
> Message String: ct_connect(): network packet layer: internal net
library
> error: There was an error encountered while establishing the
connection.
> ' at /usr/local/lib/perl5/site_perl/5.8.3/sun4-solaris/DBI.pm line 588
>        DBI connect('server=SYBDB','dbuser',...) failed: OpenClient
> message: LAYER = (5) ORIGIN = (3) SEVERITY = (5) NUMBER = (4) Server 
> SYBDB, database Message String: ct_connect(): network packet layer: 
> internal net library
> error: There was an error encountered while establishing the
connection.
>  
> DBI connect('server=SYBDB','dbuser',...) failed: OpenClient message: 
> LAYER = (5) ORIGIN = (3) SEVERITY = (5) NUMBER = (4) Server SYBDB, 
> database Message String: ct_connect(): network packet layer: internal 
> net library
> error: There was an error encountered while establishing the
connection.
>  at ./test.pl line 6
>     -> $DBI::errstr (&) FETCH from lasth=HASH
>     >> DBD::Sybase::dr::errstr
>     <- $DBI::errstr= 'OpenClient message: LAYER = (5) ORIGIN = (3) 
> SEVERITY = (5) NUMBER = (4) Server SYBDB, database Message String: 
> ct_connect(): network packet layer: internal net library
> error: There was an error encountered while establishing the
connection.
> '
> Can't connect: OpenClient message: LAYER = (5) ORIGIN = (3) SEVERITY =
> (5) NUMBER = (4)
> Server SYBDB, database
> Message String: ct_connect(): network packet layer: internal net 
> library
> error: There was an error encountered while establishing the
connection.
>  
>     -- DBI::END
>     -> disconnect_all for DBD::Sybase::dr
(DBI::dr=HASH(0x230aa0)~0x2865b4)
>     <- disconnect_all= 1 at
> /usr/local/lib/perl5/site_perl/5.8.3/sun4-solaris/DBI.pm line 653 via 
> ./test.pl line 0
> !   -> DESTROY for DBD::Sybase::dr (DBI::dr=HASH(0x2865b4)~INNER)
> !   <- DESTROY= (not implemented) during global destruction
>     DESTROY (dbih_clearcom) (drh 0x230aa0 0x0, com 0x160528, imp
> DBD::Sybase::dr):
>        FLAGS 0x215: COMSET Active Warn AutoCommit
>        PARENT undef
>        KIDS 0 (0 Active)
>        IMP_DATA undef
>     dbih_clearcom 0x230aa0 (com 0x160528, type 1) done.
>  
> !   <> DESTROY for DBI::dr=HASH(0x230aa0) ignored (inner handle gone)
> ========================
>  
>  
> $LD_LIBRARY_PATH
>
=/usr/local/sybase/OCS-12_5/lib:/usr/local/sybase/OCS-12_5/lib3p:/usr/lo
cal/sybase/SQLRemote/lib:/usr/local/sybase/EFTS-12_5/lib:/usr/local/syba
se/EFTS-12_5/verity/_ssol26/bin:/usr/local/sybase/EFTS-12_5/verity/_ssol
26/filters:/usr/local/sybase/ASE-12_5/lib:/usr/local/sybase/ASE-12_5/lib
:/usr/local/sybase/OCS-12_5/lib:/usr/lib/lwp:/usr/lib:/usr/local/sybase/
SQLRemote/lib:


-- 
Michael Peppler           -                 Peppler Consulting SaRL
mpeppler@peppler.org      -                  http://www.peppler.org
Sybase DBA/Developer      -   TeamSybase: http://www.teamsybase.com
Sybase on Linux FAQ       -   http://www.peppler.org/FAQ/linux.html