Tracking session that has a lock on a table
Posted in 2009
Topics: High Availability & Replication
We are in the process of trying to alter a fragmented table but are unable
to get an exclusive lock on the table.
So I did some detective work.
Did a query of sysframents an got the HEX of the table in question
0x00F00021
Then did an onstat -k
Locks
address wtlist owner lklist
type tblsnum rowid key#/bsiz
44194e40 0 0 0
HDR+ 100002 207 0
792a4770 0 77ab01f8 0 S
100002 207 0
7945db48 0 67b8aed8 0 HDR+IX
f00021 0 0
Found the "Intent Exclusive" lock on the table. It been like this for a
couple of days now.
I then tracked the owner with the onstat -u
Userthreads
address flags sessid user tty wait
tout locks nreads nwrites
67b8a780 ---P--- 12 informix - 0 0
0 0 296971
67b8aed8 ---PX-B 13 informix - 0 0
1 5193655 28049
Which tells me primary thread for session, critical write, BTree clean
thread.
The I check for session 13. It does not exist.
So how do I release the "Intent Exclusive" lock on the table shot of
bouncing the engine?
Thanks
Peter
--001636499e0dbeae2b047208c2c1
You have to stop the BTREE Cleaner. Is this 7.3x/9.[23]x or is it later?
In 9.40 and later you can use:
onmode -C stop 100
onmode -C kill 100
I don't remember if that worked in the earlier releases, check your
Administrator's Reference manual.
Art
Art S. Kagel
Oninit (www.oninit.com)
IIUG Board of Directors (art@iiug.org)
Disclaimer: Please keep in mind that my own opinions are my own opinions and
do not reflect on my employer, Oninit, the IIUG, nor any other organization
with which I am associated either explicitly or implicitly. Neither do
those opinions reflect those of other individuals affiliated with any entity
with which I am affiliated nor those of the entities themselves.
On Wed, Aug 26, 2009 at 6:17 AM, Peter Diaz de Leon <
peter.diazdeleon@gmail.com> wrote:
> We are in the process of trying to alter a fragmented table but are unable
> to get an exclusive lock on the table.
> So I did some detective work.
>
> Did a query of sysframents an got the HEX of the table in question
> 0x00F00021
>
> Then did an onstat -k
> Locks
> address wtlist owner lklist
> type tblsnum rowid key#/bsiz
> 44194e40 0 0 0
> HDR+ 100002 207 0
> 792a4770 0 77ab01f8 0 S
> 100002 207 0
> 7945db48 0 67b8aed8 0 HDR+IX
> f00021 0 0
>
> Found the "Intent Exclusive" lock on the table. It been like this for a
> couple of days now.
>
> I then tracked the owner with the onstat -u
>
> Userthreads
> address flags sessid user tty wait
> tout locks nreads nwrites
> 67b8a780 ---P--- 12 informix - 0 0
> 0 0 296971
> 67b8aed8 ---PX-B 13 informix - 0 0
> 1 5193655 28049
>
> Which tells me primary thread for session, critical write, BTree clean
> thread.
>
> The I check for session 13. It does not exist.
>
> So how do I release the "Intent Exclusive" lock on the table shot of
> bouncing the engine?
>
> Thanks
> Peter
>
> --001636499e0dbeae2b047208c2c1
>
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
--00151747afa400674d04720bb870
Related threads
- record locked
- who locks a record?
- Regarding Non-Default Page Sizes
- Don't Understand Table's Space Requirement