Re: Lock error on trigger creation
Posted in 2004
Thanks guys.
I didn't realise you could acquire some kind of resource which blocks
access to a table without a lock getting created. Where is this
documented?
Also onstat -g opn - Where should I be looking in the documentation
for this? It's not in anything I've downloaded.
Also I'm surprised that getting to the session id is a three-stage
process - isn't there an easier way? Can you get this info through
sysmaster?
Thanks
Andy
timothy.a.brown@marconi.com wrote in message news:<bu92gl$1ii$1@terabinaries.xmission.com>...
> Hi Andy,
>
> Since you already have the hex(partnum), here is one way you can find the
> pesky session:
>
> 1) Look for the thread that has the partition open:
> onstat -g ath | grep "^ [1-9]" | awk '{print "-g opn",$1}' | onstat -i |> grep "0x00100067"
>
> 2) Once you got the thread (ie 5228), find it's rstcb:
> onstat -g ath | grep " 5228 "| awk '{print $3}'>
> 3) Once you got the rstcb (ie c00000003f7f6d80), find the session:
> onstat -u | grep c00000003f7f6d80 | awk '{print $3}'>
> Also, you can look to see if update statistics or oncheck is running for
> the table.
>
> Good luck,
> -Tim
>
>
>
>
>
> andykent.bristol@v
> irgin.net (Andy To: informix-list@iiug.org
> Kent) cc:
> Sent by: Subject: Lock error on trigger creation
> owner-informix-lis
> t@iiug.org
>
>
> 01/16/2004 07:29
> AM
> Please respond to
> andykent.bristol
>
>
>
>
>
>
> I'm getting the following error when I try to create a trigger (My
> angle brackets):
>
> 242: Could not open database table (<tablename>).
> 106: ISAM error: non-exclusive access.>
> Whatever is causing the block has been there all morning.
>
> As far as I can tell by querying syslocks and grepping onstat -k with
> hex(partnum), neither <tablename>, nor the table the trigger accesses,
> nor systriggers have any locks on them.
>
> Where to next?
>
> Interestingly SET LOCK MODE TO WAIT makes no difference either. The
> error comes back immediately. What gives?
>
> Andy
>
>
>
>
> sending to informix-list