RE: error -271 (lock)
Posted in 2000
Topics: Server Administration
While we are at it, I need to know a command/script that will tell me what sql is locking a table if anyone knows it off hand. Thanks in advance. Thomas Tatum > -----Original Message----- > From: owner-informix-list@iiug.org > [mailto:owner-informix-list@iiug.org]On Behalf Of johnh > Sent: Friday, February 18, 2000 11:13 AM > To: informix-list@iiug.org > Subject: error -271 (lock) > > > hi > i am running processes which need to access a table. the table is 'mode > lock wait' > once one process gets access to the table, the other process kicks out a > -271 error. Is there any way of setting the lock mode so that the other > process will wait around until the table is unlocked, instead of > immediatly returning with a table locked error? > > thanks in advance for any light that can be shed on this as i am > currently stumbling in the dark! > > -- > John Horton DBA Cognito (Informix on Linux) > john.horton@cognito.co.uk > > >
Thomas B Tatum wrote:
>
> While we are at it, I need to know a command/script that will tell me what
> sql is locking a table if anyone knows it off hand.
>
> Thanks in advance.
>
> Thomas Tatum
>
> > -----Original Message-----
> > From: owner-informix-list@iiug.org
> > [mailto:owner-informix-list@iiug.org]On Behalf Of johnh
> > Sent: Friday, February 18, 2000 11:13 AM
> > To: informix-list@iiug.org
> > Subject: error -271 (lock)
> >
> >
> > hi
> > i am running processes which need to access a table. the table is 'mode
> > lock wait'
> > once one process gets access to the table, the other process kicks out a
> > -271 error. Is there any way of setting the lock mode so that the other
> > process will wait around until the table is unlocked, instead of
> > immediatly returning with a table locked error?
> >
> > thanks in advance for any light that can be shed on this as i am
> > currently stumbling in the dark!
> >
> > --
> > John Horton DBA Cognito (Informix on Linux)
> > john.horton@cognito.co.uk
> >
> >
> >
Here's one to try:
dbaccess sysmaster;
select owner, dbsname, tabname, type, username, pid, l2date(connected),
stat.sqs_statement
from syslocks locks, syssessions ses, syssqlstat stat
where locks.dbsname = '<databasename>'
and locks.tabname = '<table name>'
and locks.owner = ses.sid
and locks.owner = stat.sqs_sessionid
--
John Carlson
Informix DBA
WHSmith USA
#include std_disclaimer.h /* These are my opinions, not my company's
opinion */