|
本帖最后由 jiawang 于 2020-4-27 12:06 编辑
SQL> select blocking_session from v$session where blocking_session is not null;
BLOCKING_SESSION
----------------
2089
2089
2089
2089
2089
2089
2089
2089
2089
2089
2089
2089
2089
2089
2089
2089
2089
2089
2089
2089
2089
2089
2089
2089
2089
2089
229 rows selected.
SQL> select sid,blocking_session from v$session where blocking_session is not null;
SID BLOCKING_SESSION
---------- ----------------
5 2089
6 2089
26 2089
57 2089
76 2089
98 2089
99 2089
100 2089
126 2089
147 2089
152 2089
171 2089
173 2089
174 2089
196 2089
197 2089
201 2089
218 2089
221 2089
223 2089
242 2089
292 2089
316 2089
317 2089
318 2089
319 2089
340 2089
341 2089
363 2089
366 2089
390 2089
391 2089
392 2089
414 2089
418 2089
436 2089
437 2089
438 2089
460 2089
463 2089
484 2089
485 2089
506 2089
507 2089
509 2089
534 2089
535 2089
555 2089
558 2089
559 2089
583 2089
603 2089
608 2089
651 2089
674 2089
677 2089
678 2089
679 2089
699 2089
703 2089
706 2089
727 2089
752 2089
772 2089
798 2089
821 2089
845 2089
848 2089
866 2089
873 2089
892 2089
893 2089
894 2089
916 2089
919 2089
920 2089
940 2089
942 2089
964 2089
966 2089
989 2089
990 2089
991 2089
1011 2089
1012 2089
1013 2089
1035 2089
1039 2089
1040 2089
1061 2089
1062 2089
1083 2089
1087 2089
1089 2089
1131 2089
1132 2089
1135 2089
1161 2089
1177 2089
1180 2089
1203 2089
1207 2089
1251 2089
1274 2089
1305 2089
1328 2089
1349 2089
1372 2089
1375 2089
1395 2089
1398 2089
1421 2089
1422 2089
1424 2089
1443 2089
1448 2089
1468 2089
1490 2089
1538 2089
1539 2089
1541 2089
1544 2089
1561 2089
1562 2089
1567 2089
1585 2089
1591 2089
1592 2089
1611 2089
1613 2089
1615 2089
1638 2089
1639 2089
1660 2089
1681 2089
1682 2089
1684 2089
1688 2089
1735 2089
1778 2089
1876 2089
1878 2089
1925 2089
1948 2089
1949 2089
1953 2089
1969 2089
1972 2089
1973 2089
1975 2089
1996 2089
2020 2089
2023 2089
2041 2089
2045 2089
2047 2089
2066 2089
2067 2089
2068 2089
2095 2089
2114 2089
2117 2089
2188 2089
2209 2089
2210 2089
2215 2089
2234 2089
2236 2089
2239 2089
2257 2089
2258 2089
2281 2089
2283 2089
2284 2089
2305 2089
2307 2089
2329 2089
2354 2089
2355 2089
2357 2089
2383 2089
2402 2089
2406 2089
2425 2089
2453 2089
2455 2089
2456 2089
2475 2089
2478 2089
2502 2089
2522 2089
2546 2089
2547 2089
2550 2089
2569 2089
2575 2089
2576 2089
2595 2089
2617 2089
2642 2089
2644 2089
2645 2089
2713 2089
2717 2089
2742 2089
2743 2089
2763 2089
2768 2089
2814 2089
2838 2089
2840 2089
2858 2089
2859 2089
2863 2089
2886 2089
2906 2089
2912 2089
2953 2089
2954 2089
2955 2089
2957 2089
2958 2089
2979 2089
2980 2089
3008 2089
3030 2089
3031 2089
3051 2089
3056 2089
229 rows selected.
SQL> r
1* select sid,blocking_session ,event from v$session where blocking_session is not null
SID BLOCKING_SESSION EVENT
---------- ---------------- ----------------------------------------------------------------
5 2089 cursor: pin S wait on X
6 2089 cursor: pin S wait on X
26 2089 cursor: pin S wait on X
57 2089 cursor: pin S wait on X
76 2089 cursor: pin S wait on X
98 2089 cursor: pin S wait on X
99 2089 cursor: pin S wait on X
100 2089 cursor: pin S wait on X
126 2089 cursor: pin S wait on X
147 2089 cursor: pin S wait on X
152 2089 cursor: pin S wait on X
SID BLOCKING_SESSION EVENT
---------- ---------------- ----------------------------------------------------------------
171 2089 cursor: pin S wait on X
173 2089 cursor: pin S wait on X
174 2089 cursor: pin S wait on X
196 2089 cursor: pin S wait on X
197 2089 cursor: pin S wait on X
201 2089 cursor: pin S wait on X
218 2089 cursor: pin S wait on X
221 2089 cursor: pin S wait on X
223 2089 cursor: pin S wait on X
242 2089 cursor: pin S wait on X
292 2089 cursor: pin S wait on X
SID BLOCKING_SESSION EVENT
---------- ---------------- ----------------------------------------------------------------
316 2089 cursor: pin S wait on X
317 2089 cursor: pin S wait on X
318 2089 cursor: pin S wait on X
319 2089 cursor: pin S wait on X
340 2089 cursor: pin S wait on X
341 2089 cursor: pin S wait on X
363 2089 cursor: pin S wait on X
366 2089 cursor: pin S wait on X
390 2089 cursor: pin S wait on X
391 2089 cursor: pin S wait on X
392 2089 cursor: pin S wait on X
SID BLOCKING_SESSION EVENT
---------- ---------------- ----------------------------------------------------------------
414 2089 cursor: pin S wait on X
418 2089 cursor: pin S wait on X
436 2089 cursor: pin S wait on X
437 2089 cursor: pin S wait on X
438 2089 cursor: pin S wait on X
460 2089 cursor: pin S wait on X
463 2089 cursor: pin S wait on X
484 2089 cursor: pin S wait on X
485 2089 cursor: pin S wait on X
506 2089 cursor: pin S wait on X
507 2089 cursor: pin S wait on X
SID BLOCKING_SESSION EVENT
---------- ---------------- ----------------------------------------------------------------
509 2089 cursor: pin S wait on X
534 2089 cursor: pin S wait on X
535 2089 cursor: pin S wait on X
555 2089 cursor: pin S wait on X
558 2089 cursor: pin S wait on X
559 2089 cursor: pin S wait on X
583 2089 cursor: pin S wait on X
603 2089 cursor: pin S wait on X
608 2089 cursor: pin S wait on X
651 2089 cursor: pin S wait on X
674 2089 cursor: pin S wait on X
SID BLOCKING_SESSION EVENT
---------- ---------------- ----------------------------------------------------------------
677 2089 cursor: pin S wait on X
678 2089 cursor: pin S wait on X
679 2089 cursor: pin S wait on X
699 2089 cursor: pin S wait on X
703 2089 cursor: pin S wait on X
706 2089 cursor: pin S wait on X
727 2089 cursor: pin S wait on X
752 2089 cursor: pin S wait on X
772 2089 cursor: pin S wait on X
798 2089 cursor: pin S wait on X
根据SID查询具体信息
SQL> select sid,serial#,username,machine,blocking_session from v$session where sid= 2089;
SID SERIAL# USERNAME MACHINE BLOCKING_SESSION
---------- ---------- ------------------------------ ---------------------------------------------------------------- ----------------
2089 48071 ZLNECHIS WORKGROUP\CQS2Y-20180723E
杀掉会话
SQL> alter system kill session '2089,48071' immediate;
System altered.
SQL> select sid,serial#,username,machine,blocking_session from v$session where sid= 2089;
no rows selected
|
|