[DB-SIG] Sybase module
Harri PASANEN
harri.pasanen@trema.com
Wed, 03 Jun 1998 18:14:34 +0200
Peter Godman wrote:
>
> On Fri, 29 May 1998, Harri PASANEN wrote:
>
> > Hi,
> >
> >
> > I'm having slight problems with Peter Godman's sybase module
> > on Windows NT, with Sybase server being on Sparc-Solaris 2.6.
> >
> > The same Python program works every time on Solaris, but
> > on NT it occasionally hangs, always in the same place on
> > cursor.execute(). Looks like there is something
> > locking the cursor, as sp_lock always then gives:
> >
> > fid spid locktype table_id page
> > dbname class
> > context
> > ------ ------ ---------------------------- ----------- -----------
> > ---------------
> > 0 20 Sh_intent 16003088 0
> > fk4_0 Cursor Id 1310912
> > 0 20 Sh_page 16003088 6944
> > fk4_0 Cursor Id 1310912
> >
>
> Hmmm. It's been a long time now, but doesn't the page 0 Sh_intent mean
> that it's trying to escalate a lock to a table lock? If this were the
> case, this would mean that Sybase is not realizing that the escalation is
> unimpeded. This is quite strange.
>
> If you only use one cursor, have you tried the program using connection
> methods rather than cursor methods, i.e. using the execute method of the
> connection rather than creating a cursor? I'd be interested to see
> whether it happens there. Can you provide a sequence of DBAPI calls, or
> some python code?
>
> If all else fails, we'll have to turn on state debugging, I guess.
>
> Cheers
> Pete
>
This one resolved itself by switching the SYBASE environment variable to
point to sql11 directory, when it used to point to sql10 directory.
The path still includes sql10/dll, where the Sybase dll's likely come
from. All this is somewhat odd, and browsing Sybase documentation I
could
not really find out what the SYBASE environment variable is used for
besides looking for configuration files. All our other software
uses DB-library, this may be something related to CT-library and
versions.
All this is very bizarre, but luckily I got around
the problem.
Thanks for help offer.
Harri