Re: Lock types
Posted in 1993
clay@panix.com (Clay Irving) writes: >I tried to to select the count of the number of rows in a table this >afternoon and I received a message from ISQL that the table was locked. I >ran 'tbstat -k' and received the following: > RSAM Version 5.00.UC2 -- On-Line -- Up 7 days 05:12:00 -- 6208 Kbytes > Locks > address wtlist owner lklist type tblsnum rowid size > 3002c4dc 0 30002040 0 HDR+S 1000002 202 0 > 3002c83c 0 300020ac 0 S 1000002 203 0 > 3002c87c 0 30001efc 3002cd1c HDR+IX 10002a1 0 0 > ^^^^^^^^^^^^^^^^^^^^^^^^ > 3002c8bc 0 30001efc 3002cd3c HDR+IX 100029a 0 0 > ^^^^^^^^^^^^^^^^^^^^^^^^ > 3002cb5c 0 30001e24 0 HDR+S 1000002 203 0 > 3002ccdc 0 30002184 0 S 1000002 203 0 > 3002cd1c 0 30001efc 0 S 1000002 203 0 > 3002cd3c 0 30001efc 3002c87c HDR+U 10002a1 109 0 > 3002cdbc 0 30001ce0 0 S 1000002 203 0 > 3002ce7c 0 30001efc 3002c8bc HDR+U 100029a 10a 0 > 10 active, 100000 total, 8192 hash buckets >The underlined locks are giving me a problem -- Can someone explain what >a 'header intent exclusive' lock is? The documentation doesn't explain... An intent-exclusive (IX) lock is placed on a table any time a row in that table is being modified. The lock will be retained until the transaction in which the row modification is taking place is committed or rolled back. (Row #0 indicates a table lock.) This prevents other users from performing any operation which requires an exclusive lock (X) on the table. If you follow the linked list from the locks you have underlined, you will see there exists an update lock (U) on a row in each table for which there is an IX lock. An IX lock does not prevent another user from also acquiring an IX lock on the same resource, but does prevent another user from acquiring an X lock on that resource. ___ ___ Senior Consultant / ) __ . __/ /_ ) _ _ __ Informix Software Inc. (303) 850-0210 _/__/ (_(_ (/ / (_(_ _/__) (-' ~/ '(_- 5299 DTC Blvd #740 Englewood CO 80111 {uunet|pyramid}!infmx!dberg #include <disclaimer.h>