检查系统发现锁 enq: TX - allocate ITL entry
SQL> SELECT DISTINCT D.CURRENT_OBJ#,D.INSTANCE_NUMBER,D.SESSION_ID,D.SESSION_SERIAL#,D.BLOCKING_SESSION,D.BLOCKING_INST_ID,D.BLOCKING_SESSION_SERIAL#, D.SQL_ID,D.EVENT FROM DBA_HIST_ACTIVE_SESS_HISTORY D WHERE D.SAMPLE_TIME BETWEEN TO_DATE('2020-04-08 00:00:00', 'YYYY-MM-DD HH24:MI:SS') AND TO_DATE('2020-04-09 18:00:00', 'YYYY-MM-DD HH24:MI:SS') AND D.EVENT = 'enq: TX - allocate ITL entry' AND D.BLOCKING_SESSION_STATUS = 'VALID' order by D.SESSION_ID; INSTANCE_NUMBER SESSION_ID SESSION_SERIAL# BLOCKING_SESSION BLOCKING_INST_ID BLOCKING_SESSION_SERIAL# SQL_ID EVENT --------------- ---------- --------------- ---------------- ---------------- ------------------------ ------------- ---------------------------------------------------------------- 1 603 21460 1401 1 3960 dqq7b878ypa9s enq: TX - allocate ITL entry 1 1459 63604 278 1 51777 69sra27fnmgct enq: TX - allocate ITL entry 1 1702 47248 1558 1 51872 dqq7b878ypa9s enq: TX - allocate ITL entry 1 1956 57139 309 1 8830 dqq7b878ypa9s enq: TX - allocate ITL entry SQL> SELECT DISTINCT D.INSTANCE_NUMBER,D.SESSION_ID,D.SESSION_SERIAL#,D.BLOCKING_SESSION,D.BLOCKING_INST_ID,D.BLOCKING_SESSION_SERIAL#, D.SQL_ID,D.EVENT FROM DBA_HIST_ACTIVE_SESS_HISTORY D WHERE D.SAMPLE_TIME BETWEEN TO_DATE('2020-04-08 00:25:00', 'YYYY-MM-DD HH24:MI:SS') AND TO_DATE('2020-04-09 16:45:00', 'YYYY-MM-DD HH24:MI:SS') AND (D.SESSION_ID='309' or SESSION_ID='1558' or SESSION_ID='278' or SESSION_ID='1401' or SESSION_ID='1956' or SESSION_ID='1702' or SESSION_ID='1459' or SESSION_ID='603' or SESSION_ID='28') AND D.BLOCKING_SESSION_STATUS = 'VALID' order by D.SESSION_ID; INSTANCE_NUMBER SESSION_ID SESSION_SERIAL# BLOCKING_SESSION BLOCKING_INST_ID BLOCKING_SESSION_SERIAL# SQL_ID EVENT --------------- ---------- --------------- ---------------- ---------------- ------------------------ ------------- ---------------------------------------------------------------- 1 28 43839 58 1 15925 9z54zshd3b2a4 read by other session 1 28 43839 129 1 7783 fqyhfw5h5rs5q enq: TX - row lock contention 1 28 43839 308 1 36813 fqyhfw5h5rs5q enq: TX - row lock contention 1 28 43839 434 1 20006 a3w48gj94fxfj enq: TX - row lock contention 1 28 43839 551 1 50959 log file sync 1 28 43839 734 1 4260 fqyhfw5h5rs5q enq: TX - row lock contention 1 28 43839 778 1 49570 14t9uk1vj3zg0 enq: TX - row lock contention 1 28 43839 977 1 28609 fqyhfw5h5rs5q enq: TX - row lock contention 1 28 43839 1081 1 15773 14t9uk1vj3zg0 enq: TX - row lock contention 1 28 43839 1227 1 22566 fqyhfw5h5rs5q enq: TX - row lock contention 1 28 43839 1283 1 29043 9z54zshd3b2a4 read by other session 1 28 43839 1302 1 15221 14t9uk1vj3zg0 enq: TX - row lock contention 1 28 43839 1380 1 8426 a3w48gj94fxfj enq: TX - row lock contention 1 28 43839 1380 1 8426 fqyhfw5h5rs5q enq: TX - row lock contention 1 28 43839 1501 1 42960 a3az542myuqnw read by other session 1 28 43839 1506 1 4163 dqq7b878ypa9s enq: TX - row lock contention 1 28 43839 1653 1 28980 fqyhfw5h5rs5q enq: TX - row lock contention 1 28 43839 1757 1 63727 fqyhfw5h5rs5q enq: TX - row lock contention 1 28 43839 1780 1 30457 fqyhfw5h5rs5q enq: TX - row lock contention 1 28 43839 1931 1 836 fqyhfw5h5rs5q enq: TX - row lock contention 1 28 61677 551 1 50959 log file sync 1 278 51777 551 1 50959 log file sync 1 309 8830 551 1 50959 log file sync 1 309 8830 1504 1 43099 818fupt6xf4g3 read by other session 1 309 8830 1829 1 2960 818fupt6xf4g3 read by other session 1 309 50989 551 1 50959 log file sync 1 603 21460 77 1 11017 da7q6yjbdsjgh read by other session 1 603 21460 77 1 11462 60fd9ndq6s0zq read by other session 1 603 21460 230 1 29224 2h92m73d273cx read by other session 1 603 21460 230 1 29224 6p7xm5z95qpdy read by other session 1 603 21460 551 1 50959 log file sync 1 603 21460 605 1 46869 gst615mfyydun enq: TX - row lock contention 1 603 21460 1276 1 8622 8cfnfab62vx69 read by other session 1 603 21460 1401 1 3960 dqq7b878ypa9s enq: TX - allocate ITL entry 1 1401 3960 551 1 50959 log file sync 1 1459 53938 28 1 43839 4bvv7w64bnzwg enq: TX - row lock contention 1 1459 53938 551 1 50959 log file sync 1 1459 63604 278 1 51777 69sra27fnmgct enq: TX - allocate ITL entry 1 1459 63604 551 1 50959 log file sync 1 1459 63604 1478 1 19670 5v36wn3xrs58m read by other session 1 1558 11344 306 1 25350 60fd9ndq6s0zq read by other session 1 1558 11344 551 1 50959 log file sync 1 1558 11344 1829 1 2960 60fd9ndq6s0zq latch: cache buffers chains 1 1558 11344 1829 1 2960 7w3fbasw67p6p read by other session 1 1558 51872 28 1 43839 4bvv7w64bnzwg enq: TX - row lock contention 1 1558 51872 551 1 50959 log file sync 1 1702 47248 256 1 24637 dm65ss8csrha3 read by other session 1 1702 47248 551 1 50959 log file sync 1 1702 47248 807 1 7423 fdbd3h5rxbvy4 read by other session 1 1702 47248 1253 1 18425 818fupt6xf4g3 read by other session 1 1702 47248 1309 1 32948 4stqz6y6q3ruv read by other session 1 1702 47248 1558 1 51872 dqq7b878ypa9s enq: TX - allocate ITL entry 1 1956 42614 551 1 50959 log file sync 1 1956 57139 309 1 8830 dqq7b878ypa9s enq: TX - allocate ITL entry 1 1956 57139 402 1 58841 fdbd3h5rxbvy4 read by other session 1 1956 57139 551 1 50959 log file sync 1 1956 57139 1477 1 64660 5w5uy3ftq814t read by other session 1 1956 57139 1529 1 12822 818fupt6xf4g3 read by other session 58 rows selected. #没有发现enq: TX - allocate ITL entry互斥锁
SQL > SELECT DISTINCT D.INSTANCE_NUMBER,D.SESSION_ID,D.SESSION_SERIAL#,D.BLOCKING_SESSION,D.BLOCKING_INST_ID,D.BLOCKING_SESSION_SERIAL#, D.SQL_ID,D.EVENT FROM DBA_HIST_ACTIVE_SESS_HISTORY D WHERE D.SAMPLE_TIME BETWEEN TO_DATE('2020-04-08 00:25:00', 'YYYY-MM-DD HH24:MI:SS') AND TO_DATE('2020-04-09 16:45:00', 'YYYY-MM-DD HH24:MI:SS') AND (D.SESSION_ID='309' or SESSION_ID='1558' or SESSION_ID='278' or SESSION_ID='1401' or SESSION_ID='1956' or SESSION_ID='1702' or SESSION_ID='1459' or SESSION_ID='603' or SESSION_ID='28') AND D.BLOCKING_SESSION_STATUS = 'VALID' and D.EVENT = 'enq: TX - row lock contention' order by D.SESSION_ID; INSTANCE_NUMBER SESSION_ID SESSION_SERIAL# BLOCKING_SESSION BLOCKING_INST_ID BLOCKING_SESSION_SERIAL# SQL_ID EVENT --------------- ---------- --------------- ---------------- ---------------- ------------------------ ------------- ---------------------------------------------------------------- 1 28 43839 129 1 7783 fqyhfw5h5rs5q enq: TX - row lock contention 1 28 43839 308 1 36813 fqyhfw5h5rs5q enq: TX - row lock contention 1 28 43839 434 1 20006 a3w48gj94fxfj enq: TX - row lock contention 1 28 43839 734 1 4260 fqyhfw5h5rs5q enq: TX - row lock contention 1 28 43839 778 1 49570 14t9uk1vj3zg0 enq: TX - row lock contention 1 28 43839 977 1 28609 fqyhfw5h5rs5q enq: TX - row lock contention 1 28 43839 1081 1 15773 14t9uk1vj3zg0 enq: TX - row lock contention 1 28 43839 1227 1 22566 fqyhfw5h5rs5q enq: TX - row lock contention 1 28 43839 1302 1 15221 14t9uk1vj3zg0 enq: TX - row lock contention 1 28 43839 1380 1 8426 a3w48gj94fxfj enq: TX - row lock contention 1 28 43839 1380 1 8426 fqyhfw5h5rs5q enq: TX - row lock contention 1 28 43839 1506 1 4163 dqq7b878ypa9s enq: TX - row lock contention 1 28 43839 1653 1 28980 fqyhfw5h5rs5q enq: TX - row lock contention 1 28 43839 1757 1 63727 fqyhfw5h5rs5q enq: TX - row lock contention 1 28 43839 1780 1 30457 fqyhfw5h5rs5q enq: TX - row lock contention 1 28 43839 1931 1 836 fqyhfw5h5rs5q enq: TX - row lock contention 1 603 21460 605 1 46869 gst615mfyydun enq: TX - row lock contention 1 1459 53938 28 1 43839 4bvv7w64bnzwg enq: TX - row lock contention 1 1558 51872 28 1 43839 4bvv7w64bnzwg enq: TX - row lock contention 19 rows selected. SQL > SELECT D.SQL_ID,COUNT(1) FROM DBA_HIST_ACTIVE_SESS_HISTORY D WHERE D.SAMPLE_TIME BETWEEN TO_DATE('2020-04-08 00:25:00', 'YYYY-MM-DD HH24:MI:SS') AND TO_DATE('2020-04-09 16:45:00', 'YYYY-MM-DD HH24:MI:SS') AND (D.SESSION_ID='309' or SESSION_ID='1558' or SESSION_ID='278' or SESSION_ID='1401' or SESSION_ID='1956' or SESSION_ID='1702' or SESSION_ID='1459' or SESSION_ID='603' or SESSION_ID='28') AND D.BLOCKING_SESSION_STATUS = 'VALID' and D.EVENT = 'enq: TX - row lock contention' GROUP BY D.SQL_ID; SQL_ID COUNT(1) ------------- ---------- 4bvv7w64bnzwg 3 gst615mfyydun 1 dqq7b878ypa9s 8 a3w48gj94fxfj 18 14t9uk1vj3zg0 3 fqyhfw5h5rs5q 84 6 rows selected.