Re: Online ALTER table problems
Posted in 1994
Achim Reiners writes:
>I have a problem when trying to do the following command:
>
>ALTER TABLE Geraet DROP CONSTRAINT Geraetfk13;>
>The message I then receive is :
>
>242: Could not open database table (ar.organisation).
>106: ISAM error: non-exclusive access>
>Also repeating the alter table command does not help me.
>
>O.K. may be there is some access to the table "organisation" at this time.
>
>My Question:
>
>How can I find out which user and process holds the access (lock or whatever)
>that disallows my ALTER TABLE ?
>
>Is the reason a lock from a transaction or a open cursor or is both possible?
Any other user having that table open will cause this.
You can look for locks by first finding the tblsnum of the table (select
hex(partnum) from systables where tabname = "Geraet";), then running
tbstat -k and looking for any locks on that tblspace number. The owner
of that lock is accessing the table.
If no locks are present, tbstat -t, again looking for that tblspace number,
will show how many users are accessing that table (ucnt). It will not,
though, tell you what users have that table open.
Dave Kosenko
Informix Advanced Services
--
Disclaimer: These opinions are not those of Informix Software, Inc.
**************************************************************************
"I look back with some satisfaction on what an idiot I was when I was 25,
but when I do that, I'm assuming I'm no longer an idiot." - Andy Rooney