RE: Exclusive lock on table
Posted in 2000
When I want to know whether a table is open by a user ...
I use onstat -t | grep {hex(partnum)} and that tells me the number of users
who have the table open. Then my knowledge of the application indicates
which users that may be. I do then know when nobody is accessing that
table!
MW
-----Original Message-----
From: owner-informix-list@iiug.iiug.org
[mailto:owner-informix-list@iiug.iiug.org]On Behalf Of
mohdanas@my-deja.com
Sent: Thursday, July 27, 2000 5:17 AM
To: informix-list@iiug.org
Subject: Exclusive lock on table
Here is a situation on our production server, Hope you guys may be able
to throw some light.
We need to alter a table,add some columns.
So i tried to monitor users threads accessing this table, using
who-access.sh script in IIUG site.
It doesn't show any userthreads.
So i tried executing "alter table " statement on dbaccess , but failed
saying "can't get exclusive access" on table.
Even i tried manually by getting hex(partnum) from systabnames and
greping against onstat -g opn output, still doesn't show any threads
accessing the table.
It's true some of the applications access this table from different
databases using synonyms.
I tried scheduling cron job to alter table on odd hours, still can't get
exclusive lock and failed.
Wondering what kind of lock is remaining on the table.
I tried this several times.
Now situation is, we need to bounce box to do this, so that we can
acquire exclusive access.
I would appreciate if anyone could help on this.
Regards
Anas
Sent via Deja.com http://www.deja.com/
Before you buy.