Oracle锁的模式和10704事件跟踪对比(6)

WRI$_OPTSTAT_IND_HISTORY:
TX-0001000f-00000523 mode=6
IND$:
TX-00010007-00000523 mode=6
TX-0004000b-00000795 mode=6
TX-0007000e-00000738 mode=6
TX-0008000e-00000604 mode=6

其他锁(系统锁)的记录:
CU-XXXXXXX-00000000 mode=6    Cursor bind 游标绑定锁 多个
DL-00015bb4-00000000 mode=3  指向TEXT_T1
DL-00015bd2-00000000 mode=3  指向临时对象SYS_JOURNAL_89041
ZH-00015bd2-00000001 mode=6  指向临时对象SYS_JOURNAL_89041
ZH-00015bd2-00000002 mode=6  指向临时对象SYS_JOURNAL_89041
ZH-00015bd2-00000003 mode=6  指向临时对象SYS_JOURNAL_89041
ZH-00015bd2-00000004 mode=6  指向临时对象SYS_JOURNAL_89041
OD-00015bb4-00000000 mode=4  指向TEXT_T1
TT-0000000e-00000010 mode=4    指向SEG$
TS-0000000e-01c00082 mode=6    指向SEG$
TS-0000000e-0186978a mode=6    指向SEG$
TS-0000000e-01c00083 mode=6    指向SEG$
FB-0000000e-01c00080 mode=6    指向SEG$
SE-0000002d-00000005 mode=4
HW-0000000e-0186978a mode=6  指向SEG$
RO-00010013-00000001 mode=6
CR-00010013-00000002 mode=6
CR-00010013-00000001 mode=6
CR-00010013-00000002 mode=6
MR-00000002-00000002 mode=4
TO-000137d9-00000001 mode=3  指向SDO_GEOR_DDL__TABLE$$
TO-000137d9-00000002 mode=3  指向SDO_GEOR_DDL__TABLE$$
SE-0000002d-00000005 mode=4

五、Offline rebuild和Online rebuild索引锁的跟踪对比
1.alter index rebuild

Session 1
SQL> drop index idx_text01;
SQL> create index ind_text02 on text_t1(object_id);
SQL> update text_t1 set OBJECT_ID=666 where OBJECT_ID<1000;
510464 rows updated.
SQL> alter session set events '10704 trace name context forever, level 12';
SQL> alter index ind_text02 rebuild;

Session 2
观察V$lock
SQL> select * from v$lock where sid=45;
ADDR KADDR SID TY        ID1  ID2  LMODE    REQUEST CTIME    BLOCK
---------------- ---------------- ---------- -- ---------- ---------- ---------- ---------- ---------- ----------
00000000BED5CBB8 00000000BED5CC10  45 OD      89050    0      6  0    60 0
00000000BED5CC98 00000000BED5CCF0  45 DL      89012    0      3  0    60 0
00000000BED5CE58 00000000BED5CEB0  45 AE        100    0      4  0  257 0
00000000BED5D650 00000000BED5D6A8  45 DL      89012    0      3  0    60 0
00007FCD9BB78810 00007FCD9BB78870  45 TM      89012    0      4  0    60 0
00000000BBE04B08 00000000BBE04BB8  45 TS 14  25855426      6  0    25 0
00000000BBED43E8 00000000BBED4460  45 TX    131098 1519      6  0    25 0

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/76374180f769292c951d105c76b85824.html