oracle locking question
HarveyApr 10 2013 — edited Apr 10 2013ADDR KADDR SID TY ID1 ID2 LMODE REQUEST CTIME BLOCK
---------------- ---------------- ---------- -- ---------- ---------- ---------- ---------- ---------- ----------
00000004160D72B8 00000004160D7310 1966 AE 100 0 4 0 499 0
00000004160D7FD0 00000004160D8028 1966 TO 81148 1 3 0 498 0
FFFFFFFF7B646EB0 FFFFFFFF7B646F10 1966 TM 79582 0 3 0 23 0
0000000414E1A040 0000000414E1A0B8 1966 TX 393244 678662 6 0 23 0
I am getting above locks when i am ussing select for update no wait from oracle forms and it lock the whole table I can not under stand why.
When issue the same select for update nowait from sql prompt I am getting following
ADDR KADDR SID TY ID1 ID2 LMODE REQUEST CTIME BLOCK
---------------- ---------------- ---------- -- ---------- ---------- ---------- ---------- ---------- ----------
00000004160D7798 00000004160D77F0 1997 AE 100 0 4 0 75 0
FFFFFFFF7B646EB0 FFFFFFFF7B646F10 1997 TM 79582 0 3 0 44 0
0000000414F002E8 0000000414F00360 1997 TX 655387 838567 6 0 44 0
and after above when I issue another SQL select for update for different row on same table the second session is:
ADDR KADDR SID TY ID1 ID2 LMODE REQUEST CTIME BLOCK
---------------- ---------------- ---------- -- ---------- ---------- ---------- ---------- ---------- ----------
00000004160D71E8 00000004160D7240 1982 AE 100 0 4 0 4123 0
FFFFFFFF7B645E78 FFFFFFFF7B645ED8 1982 TM 79582 0 3 0 17 0
0000000414E7DDE8 0000000414E7DE60 1982 TX 589848 710577 6 0 17 0
Can someone tell me what is
1. Lock type TO and AE
2. Why locky type TO is there in oracle forms
3. why issuing the same select for update nowait from oracle form does not allow any other session sql or from oracle forms to get the lock on row?
Thank you.