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: Michael Burstin <mikeb at concerto dot com>
Subject: Re: DBI/DBD::Sybase error handling issues
Date: Apr 24 2002 2:36PM

On Wed, Apr 24, 2002 at 07:27:09AM -0700, Michael Peppler wrote:
> On Wed, 2002-04-24 at 07:15, Michael Burstin wrote:
> > I am once again running into some "interesting" error handling
> > sitations.  I have a set of scripts which are actually causing a
> > Sybase stacktrace, but in this, I discovered that I am not actually
> > catching the Sybase error in my DBI code.  I am in a situation where
> > $DBI::errstr is being set, however, $DBI::err is not!  I thought that
> > this was an impossible state to get into (I thought they were directly
> > tied together, errstr only getting set if err is set).
> 
> > Sybase is returning a 5702 error to me (my code is causing a stack
> > trace), the Sybase write-up on this states to fix the error causing
> > this issue (which I agree), but I don't understand why I don't catch
> > this.
> > 
> > (I know the cause of these errors are someone tried to create a raw
> > device on a mounted UFS file system -- these scripts are being
> > developed to stage systems, not run on a system once live).
> 

> Are you *sure* that the code below causes the 5702 error? Isn't it
> the DISK INIT call that would cause the error?

Yes.  It definatly happens in the create database statement.  I even
tried running the SQL itself from an isql prompt, and I get the
following:

1> sp_helpdevice logs
2> go



1> create database archive on   archive_data = '1000m'
2> log on   logs = '500m'
3> go
The SQL Server is terminating this process.
1> select @@version
2> go
CT-LIBRARY error:
	ct_send(): network packet layer: internal Client Library
error: State error: trying to write when connection is expecting a
read. 
CT-LIBRARY error:
	ct_cancel(): network packet layer: internal net library error:
Net-Library operation terminated due to disconnect 

> The trace you show is clean - if there is an error from Sybase it
> normally gets printed in the trace...

Definatly strange...  I know I can avoid this, just bizarre that I
don't catch it.

Hmm!  I wonder if this is actually some Sybase OpenClient (or
dataserver) bug?

-- 
Michael Burstin
NPI Engineer
Concerto Software *
978-952-0842
mikeb@concerto.com
*Davox & Cellit Corporations are now doing business as Concerto Software