오라클에서 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에서 이동 됨]
게시판 목록
프로그램
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 1030 | 18년 전 | 1797 | ||
| 1029 | 18년 전 | 2230 | ||
| 1028 | 18년 전 | 2640 | ||
| 1027 | 18년 전 | 1807 | ||
| 1026 | 18년 전 | 1544 | ||
| 1025 | 18년 전 | 1553 | ||
| 1024 | 18년 전 | 1477 | ||
| 1023 | 18년 전 | 3237 | ||
| 1022 | 18년 전 | 2922 | ||
| 1021 | 18년 전 | 1685 | ||
| 1020 | 18년 전 | 3427 | ||
| 1019 | 18년 전 | 1852 | ||
| 1018 | 18년 전 | 1505 | ||
| 1017 | 18년 전 | 1971 | ||
| 1016 | 18년 전 | 2105 | ||
| 1015 | 18년 전 | 1650 | ||
| 1014 | 18년 전 | 2360 | ||
| 1013 | 18년 전 | 2011 | ||
| 1012 | 18년 전 | 1636 | ||
| 1011 | 18년 전 | 1796 | ||
| 1010 | 18년 전 | 2054 | ||
| 1009 | 18년 전 | 1811 | ||
| 1008 | 19년 전 | 1633 | ||
| 1007 | 19년 전 | 1676 | ||
| 1006 | 19년 전 | 3141 | ||
| 1005 | 19년 전 | 2013 | ||
| 1004 | 19년 전 | 1880 | ||
| 1003 | 19년 전 | 4373 | ||
| 1002 | 19년 전 | 5002 | ||
| 1001 | 19년 전 | 3175 | ||
| 1000 | 19년 전 | 2920 | ||
| 999 | 19년 전 | 3513 | ||
| 998 | 19년 전 | 2066 | ||
| 997 | 19년 전 | 2425 | ||
| 996 | 19년 전 | 2710 | ||
| 995 | 19년 전 | 2769 | ||
| 994 | 19년 전 | 2363 | ||
| 993 | 19년 전 | 1627 | ||
| 992 | 19년 전 | 3390 | ||
| 991 | 19년 전 | 2001 | ||
| 990 | 19년 전 | 2395 | ||
| 989 | 19년 전 | 2472 | ||
| 988 | 19년 전 | 2899 | ||
| 987 | 19년 전 | 5229 | ||
| 986 |
|
19년 전 | 2503 | |
| 985 |
|
19년 전 | 3354 | |
| 984 | 19년 전 | 4285 | ||
| 983 |
느낌좋은날
|
19년 전 | 2515 | |
| 982 | 19년 전 | 2480 | ||
| 981 | 19년 전 | 4050 | ||
| 980 | 19년 전 | 2756 | ||
| 979 |
Sinpre
|
19년 전 | 3005 | |
| 978 | 19년 전 | 2218 | ||
| 977 | 19년 전 | 2228 | ||
| 976 | 19년 전 | 1997 | ||
| 975 | 19년 전 | 3281 | ||
| 974 | 19년 전 | 2116 | ||
| 973 |
|
19년 전 | 2802 | |
| 972 |
|
19년 전 | 1752 | |
| 971 | 19년 전 | 5328 | ||
| 970 | 19년 전 | 3587 | ||
| 969 | 19년 전 | 4341 | ||
| 968 | 19년 전 | 3080 | ||
| 967 | 19년 전 | 2536 | ||
| 966 | 19년 전 | 3938 | ||
| 965 | 19년 전 | 2671 | ||
| 964 | 19년 전 | 3007 | ||
| 963 | 19년 전 | 2975 | ||
| 962 | 19년 전 | 4195 | ||
| 961 | 19년 전 | 3140 | ||
| 960 | 19년 전 | 3040 | ||
| 959 | 19년 전 | 3690 | ||
| 958 | 19년 전 | 2984 | ||
| 957 | 19년 전 | 2198 | ||
| 956 | 19년 전 | 2231 | ||
| 955 | 19년 전 | 2188 | ||
| 954 | 19년 전 | 2780 | ||
| 953 | 19년 전 | 2494 | ||
| 952 | 19년 전 | 3364 | ||
| 951 | 19년 전 | 3219 | ||
| 950 | 19년 전 | 1835 | ||
| 949 | 19년 전 | 2744 | ||
| 948 | 19년 전 | 7833 | ||
| 947 |
|
19년 전 | 2509 | |
| 946 |
DeepnBlue
|
19년 전 | 3120 | |
| 945 |
pearly
|
19년 전 | 2895 | |
| 944 | 19년 전 | 3035 | ||
| 943 |
|
19년 전 | 2245 | |
| 942 | 19년 전 | 2459 | ||
| 941 |
|
19년 전 | 4083 | |
| 940 | 19년 전 | 2239 | ||
| 939 |
|
19년 전 | 4225 | |
| 938 |
|
19년 전 | 2390 | |
| 937 | 19년 전 | 2090 | ||
| 936 |
|
19년 전 | 2336 | |
| 935 | 19년 전 | 1884 | ||
| 934 |
|
19년 전 | 2415 | |
| 933 | 19년 전 | 2212 | ||
| 932 |
|
19년 전 | 3086 | |
| 931 | 19년 전 | 1870 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기