오라클에서 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에서 이동 됨]
게시판 목록
프로그램
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 8230 | 9년 전 | 115 | ||
| 8229 | 9년 전 | 110 | ||
| 8228 |
커네드커네드
|
9년 전 | 154 | |
| 8227 | 9년 전 | 190 | ||
| 8226 | 9년 전 | 207 | ||
| 8225 | 9년 전 | 190 | ||
| 8224 | 9년 전 | 183 | ||
| 8223 | 9년 전 | 161 | ||
| 8222 |
|
9년 전 | 239 | |
| 8221 | 9년 전 | 143 | ||
| 8220 | 9년 전 | 177 | ||
| 8219 | 9년 전 | 139 | ||
| 8218 | 9년 전 | 187 | ||
| 8217 |
star3840
|
9년 전 | 158 | |
| 8216 | 9년 전 | 222 | ||
| 8215 | 9년 전 | 176 | ||
| 8214 | 9년 전 | 269 | ||
| 8213 | 9년 전 | 223 | ||
| 8212 | 9년 전 | 138 | ||
| 8211 | 9년 전 | 307 | ||
| 8210 | 9년 전 | 315 | ||
| 8209 | 9년 전 | 389 | ||
| 8208 | 9년 전 | 281 | ||
| 8207 | 9년 전 | 282 | ||
| 8206 |
|
9년 전 | 241 | |
| 8205 | 9년 전 | 222 | ||
| 8204 | 9년 전 | 194 | ||
| 8203 | 9년 전 | 271 | ||
| 8202 | 9년 전 | 190 | ||
| 8201 | 9년 전 | 232 | ||
| 8200 | 9년 전 | 230 | ||
| 8199 | 9년 전 | 255 | ||
| 8198 | 9년 전 | 220 | ||
| 8197 | 9년 전 | 211 | ||
| 8196 | 9년 전 | 604 | ||
| 8195 | 9년 전 | 212 | ||
| 8194 | 9년 전 | 327 | ||
| 8193 | 9년 전 | 219 | ||
| 8192 | 9년 전 | 249 | ||
| 8191 | 9년 전 | 201 | ||
| 8190 | 9년 전 | 200 | ||
| 8189 | 9년 전 | 253 | ||
| 8188 | 9년 전 | 191 | ||
| 8187 | 9년 전 | 190 | ||
| 8186 | 9년 전 | 195 | ||
| 8185 | 9년 전 | 366 | ||
| 8184 | 9년 전 | 150 | ||
| 8183 | 9년 전 | 368 | ||
| 8182 | 9년 전 | 224 | ||
| 8181 | 9년 전 | 183 | ||
| 8180 | 9년 전 | 760 | ||
| 8179 | 9년 전 | 532 | ||
| 8178 | 9년 전 | 379 | ||
| 8177 |
kiplayer
|
9년 전 | 387 | |
| 8176 | 9년 전 | 416 | ||
| 8175 | 9년 전 | 290 | ||
| 8174 | 9년 전 | 294 | ||
| 8173 | 9년 전 | 387 | ||
| 8172 | 9년 전 | 252 | ||
| 8171 | 9년 전 | 229 | ||
| 8170 | 9년 전 | 346 | ||
| 8169 |
커네드커네드
|
9년 전 | 305 | |
| 8168 | 9년 전 | 373 | ||
| 8167 | 9년 전 | 371 | ||
| 8166 | 9년 전 | 279 | ||
| 8165 | 9년 전 | 218 | ||
| 8164 | 9년 전 | 360 | ||
| 8163 | 9년 전 | 347 | ||
| 8162 | 9년 전 | 354 | ||
| 8161 | 9년 전 | 367 | ||
| 8160 |
|
9년 전 | 557 | |
| 8159 | 9년 전 | 499 | ||
| 8158 | 9년 전 | 310 | ||
| 8157 | 9년 전 | 425 | ||
| 8156 | 9년 전 | 310 | ||
| 8155 | 9년 전 | 301 | ||
| 8154 |
00년생용띠
|
9년 전 | 642 | |
| 8153 | 9년 전 | 282 | ||
| 8152 |
|
9년 전 | 463 | |
| 8151 | 9년 전 | 461 | ||
| 8150 | 9년 전 | 567 | ||
| 8149 |
Jangfolk
|
9년 전 | 411 | |
| 8148 | 9년 전 | 232 | ||
| 8147 | 9년 전 | 431 | ||
| 8146 | 9년 전 | 503 | ||
| 8145 | 9년 전 | 456 | ||
| 8144 | 9년 전 | 421 | ||
| 8143 | 9년 전 | 253 | ||
| 8142 | 9년 전 | 480 | ||
| 8141 | 9년 전 | 428 | ||
| 8140 | 9년 전 | 976 | ||
| 8139 | 9년 전 | 328 | ||
| 8138 |
전갈자리남자
|
9년 전 | 435 | |
| 8137 | 9년 전 | 465 | ||
| 8136 | 9년 전 | 799 | ||
| 8135 |
|
9년 전 | 836 | |
| 8134 |
PlayPixel
|
9년 전 | 575 | |
| 8133 |
|
9년 전 | 491 | |
| 8132 | 9년 전 | 508 | ||
| 8131 | 9년 전 | 876 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기