오라클에서 lock체크 스크립트 입니다.
작업 시간이 오래걸리는 spid 찾아주는 쿼리문 입니다.
select /*+ ordered / distinct /* 속도를 위해 v$sql을 조인할 경우 중복되는 레코드 제거 */
s.sid SID, s.username, s.program, p.spid "OS-Pid",w.seconds_in_wait as "W_time(Sec)",
decode(w.wait_time,0,'Wai-ting', 'Waited') Status, w.ename event,
-- p1text || ':' || decode(event,'latch free',p1raw, to_char(p1)) ||','||
-- p2text || ':' || to_char(p2) ||','|| p3text || ':' || to_char(p3) "Additional Info",
q.sql_text
from ( select a.*, decode(a.event,'latch free', 'latch free (' ||b.name||')',
'row cache lock', 'row cache lock (' || c.parameter || ')',
'enqueue', 'enqueue ('||chr(bitand(p1, -16777216)/16777215)||
chr(bitand(p1,16711680)/65535)||':'||
decode(bitand(p1,65535), 1, 'N', 2, 'SS',3,'SX',4,'S',5,'SSX',6,'X') ||')',
a.event ) ename
from v$session_wait a, v$latchname b, v$rowcache c
where a.p2 = b.latch#(+) and a.p1 = c.cache#(+) and c.type(+) = 'PARENT'
and a.event not in ('rdbms ipc message','smon timer','pmon timer','slave wait','pipe get','null event',
'SQL*Net message from client', 'SQL*Net message to client','PX Idle Wait',
'PX Deq: Execution Msg', 'KXFQ: kxfqdeq - normal deqeue',
'ges remote message', 'wakeup time manager', /* idle event 적절히 수정 */
'lock manager wait for remote message', 'single-task message')
) w, v$session s, v$process p, v$sql q
where w.sid = s.sid and s.paddr = p.addr
and s.sql_hash_value = q.hash_value(+) and s.sql_address = q.address(+)
order by w.ename;
[이 게시물은 관리자님에 의해 2011-10-31 16:47:36 Oracle에서 이동 됨]
게시판 목록
프로그램
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 2730 | 15년 전 | 651 | ||
| 2729 | 15년 전 | 1397 | ||
| 2728 |
|
15년 전 | 930 | |
| 2727 |
용다섯마리
|
15년 전 | 687 | |
| 2726 |
니콜크더만
|
15년 전 | 772 | |
| 2725 |
Insungbyun
|
15년 전 | 833 | |
| 2724 | 15년 전 | 1226 | ||
| 2723 | 15년 전 | 724 | ||
| 2722 | 15년 전 | 735 | ||
| 2721 | 15년 전 | 949 | ||
| 2720 | 15년 전 | 682 | ||
| 2719 |
|
15년 전 | 1426 | |
| 2718 | 15년 전 | 1051 | ||
| 2717 |
디이자이너
|
15년 전 | 2869 | |
| 2716 |
|
15년 전 | 1362 | |
| 2715 | 15년 전 | 650 | ||
| 2714 |
고추장불고기
|
15년 전 | 621 | |
| 2713 | 15년 전 | 786 | ||
| 2712 | 15년 전 | 1259 | ||
| 2711 | 15년 전 | 1187 | ||
| 2710 | 15년 전 | 668 | ||
| 2709 | 15년 전 | 792 | ||
| 2708 |
TWM소프트
|
15년 전 | 980 | |
| 2707 |
|
15년 전 | 1213 | |
| 2706 |
|
15년 전 | 1015 | |
| 2705 | 15년 전 | 995 | ||
| 2704 | 15년 전 | 1188 | ||
| 2703 |
|
15년 전 | 666 | |
| 2702 |
|
15년 전 | 650 | |
| 2701 | 15년 전 | 1056 | ||
| 2700 | 15년 전 | 644 | ||
| 2699 | 15년 전 | 1743 | ||
| 2698 | 15년 전 | 2249 | ||
| 2697 |
|
15년 전 | 817 | |
| 2696 | 15년 전 | 816 | ||
| 2695 | 15년 전 | 1479 | ||
| 2694 |
|
15년 전 | 882 | |
| 2693 | 15년 전 | 977 | ||
| 2692 | 15년 전 | 1386 | ||
| 2691 |
Homepix
|
15년 전 | 1546 | |
| 2690 | 15년 전 | 1649 | ||
| 2689 | 15년 전 | 1089 | ||
| 2688 |
sooram
|
15년 전 | 1757 | |
| 2687 |
terrorboys
|
15년 전 | 1569 | |
| 2686 |
진정한승리
|
15년 전 | 801 | |
| 2685 |
|
15년 전 | 1789 | |
| 2684 |
진정한승리
|
15년 전 | 922 | |
| 2683 |
dannykim
|
15년 전 | 776 | |
| 2682 | 15년 전 | 826 | ||
| 2681 | 15년 전 | 776 | ||
| 2680 | 15년 전 | 944 | ||
| 2679 | 15년 전 | 961 | ||
| 2678 | 15년 전 | 1173 | ||
| 2677 |
|
15년 전 | 3185 | |
| 2676 | 15년 전 | 1755 | ||
| 2675 | 15년 전 | 897 | ||
| 2674 | 15년 전 | 1596 | ||
| 2673 | 15년 전 | 764 | ||
| 2672 | 15년 전 | 903 | ||
| 2671 |
다케미카코
|
15년 전 | 1861 | |
| 2670 | 15년 전 | 1813 | ||
| 2669 | 15년 전 | 853 | ||
| 2668 |
terrorboys
|
15년 전 | 1113 | |
| 2667 | 15년 전 | 1069 | ||
| 2666 | 15년 전 | 1034 | ||
| 2665 | 15년 전 | 1221 | ||
| 2664 | 15년 전 | 951 | ||
| 2663 | 15년 전 | 977 | ||
| 2662 | 15년 전 | 900 | ||
| 2661 | 15년 전 | 1029 | ||
| 2660 | 15년 전 | 945 | ||
| 2659 | 15년 전 | 1542 | ||
| 2658 | 15년 전 | 782 | ||
| 2657 | 15년 전 | 750 | ||
| 2656 | 15년 전 | 1387 | ||
| 2655 | 15년 전 | 1289 | ||
| 2654 | 15년 전 | 1233 | ||
| 2653 | 15년 전 | 804 | ||
| 2652 | 15년 전 | 1593 | ||
| 2651 | 15년 전 | 977 | ||
| 2650 | 15년 전 | 1629 | ||
| 2649 |
windday
|
15년 전 | 1983 | |
| 2648 | 15년 전 | 1410 | ||
| 2647 | 15년 전 | 7606 | ||
| 2646 | 15년 전 | 1036 | ||
| 2645 | 15년 전 | 1256 | ||
| 2644 | 15년 전 | 982 | ||
| 2643 | 15년 전 | 1199 | ||
| 2642 | 15년 전 | 976 | ||
| 2641 | 15년 전 | 1191 | ||
| 2640 |
프리랜서개발자
|
15년 전 | 922 | |
| 2639 | 15년 전 | 2012 | ||
| 2638 | 15년 전 | 1025 | ||
| 2637 | 15년 전 | 931 | ||
| 2636 | 15년 전 | 1421 | ||
| 2635 | 15년 전 | 1314 | ||
| 2634 | 15년 전 | 1040 | ||
| 2633 | 15년 전 | 916 | ||
| 2632 | 15년 전 | 951 | ||
| 2631 | 15년 전 | 1232 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기