오라클에서 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에서 이동 됨]
게시판 목록
프로그램
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 2130 | 17년 전 | 1172 | ||
| 2129 |
ⓧ힘내세요
|
17년 전 | 2230 | |
| 2128 | 17년 전 | 2872 | ||
| 2127 | 17년 전 | 4055 | ||
| 2126 | 17년 전 | 3142 | ||
| 2125 | 17년 전 | 1404 | ||
| 2124 | 17년 전 | 1707 | ||
| 2123 | 17년 전 | 2235 | ||
| 2122 | 17년 전 | 1542 | ||
| 2121 | 17년 전 | 1719 | ||
| 2120 | 17년 전 | 2712 | ||
| 2119 | 17년 전 | 2141 | ||
| 2118 | 17년 전 | 1794 | ||
| 2117 |
아름다운세상
|
17년 전 | 4195 | |
| 2116 | 17년 전 | 3046 | ||
| 2115 | 17년 전 | 1435 | ||
| 2114 |
아름다운세상
|
17년 전 | 3566 | |
| 2113 | 17년 전 | 2793 | ||
| 2112 | 17년 전 | 2072 | ||
| 2111 | 17년 전 | 1288 | ||
| 2110 | 17년 전 | 2327 | ||
| 2109 | 17년 전 | 2063 | ||
| 2108 | 17년 전 | 1982 | ||
| 2107 |
휴전합시다
|
17년 전 | 1918 | |
| 2106 | 17년 전 | 1168 | ||
| 2105 |
|
17년 전 | 1871 | |
| 2104 | 17년 전 | 2925 | ||
| 2103 | 17년 전 | 1426 | ||
| 2102 | 17년 전 | 1668 | ||
| 2101 | 17년 전 | 1353 | ||
| 2100 | 17년 전 | 1598 | ||
| 2099 | 17년 전 | 1572 | ||
| 2098 | 17년 전 | 1443 | ||
| 2097 | 17년 전 | 2555 | ||
| 2096 | 17년 전 | 2321 | ||
| 2095 | 17년 전 | 2107 | ||
| 2094 | 17년 전 | 1417 | ||
| 2093 | 17년 전 | 2427 | ||
| 2092 | 17년 전 | 4255 | ||
| 2091 | 17년 전 | 2740 | ||
| 2090 | 17년 전 | 1658 | ||
| 2089 | 17년 전 | 1849 | ||
| 2088 | 17년 전 | 3225 | ||
| 2087 | 17년 전 | 2226 | ||
| 2086 | 17년 전 | 3820 | ||
| 2085 | 17년 전 | 1671 | ||
| 2084 | 17년 전 | 2267 | ||
| 2083 | 17년 전 | 2095 | ||
| 2082 | 17년 전 | 1610 | ||
| 2081 | 17년 전 | 2125 | ||
| 2080 |
letsgolee
|
17년 전 | 1921 | |
| 2079 | 17년 전 | 1957 | ||
| 2078 | 17년 전 | 3069 | ||
| 2077 | 17년 전 | 2143 | ||
| 2076 | 17년 전 | 1435 | ||
| 2075 | 17년 전 | 1455 | ||
| 2074 | 17년 전 | 2125 | ||
| 2073 | 17년 전 | 3205 | ||
| 2072 | 17년 전 | 2136 | ||
| 2071 |
휴전합시다
|
17년 전 | 1530 | |
| 2070 | 17년 전 | 4237 | ||
| 2069 | 17년 전 | 2031 | ||
| 2068 | 17년 전 | 3458 | ||
| 2067 | 17년 전 | 6030 | ||
| 2066 | 17년 전 | 1483 | ||
| 2065 |
letsgolee
|
17년 전 | 1652 | |
| 2064 | 17년 전 | 1235 | ||
| 2063 | 17년 전 | 1347 | ||
| 2062 |
vicky
|
17년 전 | 2872 | |
| 2061 | 17년 전 | 1908 | ||
| 2060 |
카프카07
|
17년 전 | 2594 | |
| 2059 | 17년 전 | 1302 | ||
| 2058 | 17년 전 | 3184 | ||
| 2057 | 17년 전 | 2161 | ||
| 2056 | 17년 전 | 2606 | ||
| 2055 | 17년 전 | 1405 | ||
| 2054 | 17년 전 | 1751 | ||
| 2053 | 17년 전 | 1145 | ||
| 2052 |
|
17년 전 | 1202 | |
| 2051 | 17년 전 | 1785 | ||
| 2050 | 17년 전 | 1227 | ||
| 2049 | 17년 전 | 4309 | ||
| 2048 | 17년 전 | 1504 | ||
| 2047 | 17년 전 | 2002 | ||
| 2046 |
카프카07
|
17년 전 | 7088 | |
| 2045 | 17년 전 | 1382 | ||
| 2044 | 17년 전 | 1894 | ||
| 2043 | 17년 전 | 3132 | ||
| 2042 | 17년 전 | 1220 | ||
| 2041 |
카프카07
|
17년 전 | 1982 | |
| 2040 | 17년 전 | 1152 | ||
| 2039 |
smilesol
|
17년 전 | 1847 | |
| 2038 | 17년 전 | 2152 | ||
| 2037 |
|
17년 전 | 2965 | |
| 2036 | 17년 전 | 1244 | ||
| 2035 |
|
17년 전 | 1333 | |
| 2034 |
ㅣ곰탱이ㅣ
|
17년 전 | 1560 | |
| 2033 |
|
17년 전 | 1231 | |
| 2032 | 17년 전 | 4352 | ||
| 2031 | 17년 전 | 3895 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기