Re: non exclusive access
Posted in 1997
On 19 May 1997, Scott Black wrote:
> Has any one else run across this problem?
>
> If I run something like the following
>
> set lock mode to wait;> begin work;
> lock table table1 in exclusive mode;
>
> alter table table1...
> commit work;
>
> I get:
> 242: Could not open database table (informix.table1).
> 106: ISAM error: non-exclusive access.
That's rough. Almost true, but painfully annoying.
> So it gets to the alter table statement, it has to have run the lock table statement,
> and yet I don't have exclusive access!!
>
> Informix says there is no bug because they cannot recreate the problem in their
> sterile single user environment.
>
> Is there a work around (short of going to quiescent)
Absolutely. You're doing too much work here. Just issue the ALTER TABLE
statement -- it will lock the table itself. If it complains, you can set
up a repeating loop that will attempt the alter table and retry if theres
a locking issue (or other error) easily enough.
However, if the LOCK TABLE statement would have worked, the ALTER command
should as well.
HTH.
-Richard