오라클에서 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에서 이동 됨]
게시판 목록
프로그램
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 7930 | 9년 전 | 369 | ||
| 7929 | 9년 전 | 262 | ||
| 7928 | 9년 전 | 374 | ||
| 7927 | 9년 전 | 296 | ||
| 7926 | 9년 전 | 644 | ||
| 7925 | 9년 전 | 311 | ||
| 7924 | 9년 전 | 286 | ||
| 7923 | 9년 전 | 322 | ||
| 7922 | 9년 전 | 342 | ||
| 7921 | 9년 전 | 374 | ||
| 7920 | 9년 전 | 295 | ||
| 7919 | 9년 전 | 311 | ||
| 7918 | 9년 전 | 475 | ||
| 7917 | 9년 전 | 314 | ||
| 7916 | 9년 전 | 382 | ||
| 7915 | 9년 전 | 367 | ||
| 7914 | 9년 전 | 379 | ||
| 7913 | 9년 전 | 504 | ||
| 7912 | 9년 전 | 379 | ||
| 7911 | 9년 전 | 332 | ||
| 7910 | 9년 전 | 360 | ||
| 7909 | 9년 전 | 471 | ||
| 7908 | 9년 전 | 368 | ||
| 7907 | 9년 전 | 319 | ||
| 7906 | 9년 전 | 336 | ||
| 7905 | 9년 전 | 328 | ||
| 7904 | 9년 전 | 296 | ||
| 7903 | 9년 전 | 293 | ||
| 7902 | 9년 전 | 514 | ||
| 7901 |
|
9년 전 | 716 | |
| 7900 | 9년 전 | 538 | ||
| 7899 | 9년 전 | 346 | ||
| 7898 | 9년 전 | 339 | ||
| 7897 | 9년 전 | 296 | ||
| 7896 | 9년 전 | 316 | ||
| 7895 | 9년 전 | 424 | ||
| 7894 | 9년 전 | 346 | ||
| 7893 | 9년 전 | 278 | ||
| 7892 | 9년 전 | 323 | ||
| 7891 | 9년 전 | 710 | ||
| 7890 | 9년 전 | 1174 | ||
| 7889 | 9년 전 | 730 | ||
| 7888 |
limsy1987
|
9년 전 | 528 | |
| 7887 | 9년 전 | 499 | ||
| 7886 | 9년 전 | 389 | ||
| 7885 | 9년 전 | 361 | ||
| 7884 | 9년 전 | 370 | ||
| 7883 | 9년 전 | 350 | ||
| 7882 | 9년 전 | 362 | ||
| 7881 | 9년 전 | 392 | ||
| 7880 | 9년 전 | 517 | ||
| 7879 | 9년 전 | 412 | ||
| 7878 | 9년 전 | 1157 | ||
| 7877 | 9년 전 | 707 | ||
| 7876 | 9년 전 | 434 | ||
| 7875 | 9년 전 | 509 | ||
| 7874 |
|
9년 전 | 780 | |
| 7873 | 9년 전 | 482 | ||
| 7872 | 9년 전 | 616 | ||
| 7871 | 9년 전 | 446 | ||
| 7870 | 9년 전 | 569 | ||
| 7869 | 9년 전 | 387 | ||
| 7868 | 9년 전 | 384 | ||
| 7867 | 9년 전 | 381 | ||
| 7866 | 9년 전 | 440 | ||
| 7865 | 9년 전 | 397 | ||
| 7864 | 9년 전 | 462 | ||
| 7863 | 9년 전 | 453 | ||
| 7862 | 9년 전 | 431 | ||
| 7861 | 9년 전 | 588 | ||
| 7860 | 9년 전 | 594 | ||
| 7859 | 9년 전 | 363 | ||
| 7858 | 9년 전 | 672 | ||
| 7857 | 9년 전 | 1021 | ||
| 7856 | 9년 전 | 484 | ||
| 7855 | 9년 전 | 698 | ||
| 7854 | 9년 전 | 699 | ||
| 7853 | 9년 전 | 538 | ||
| 7852 | 9년 전 | 473 | ||
| 7851 | 9년 전 | 447 | ||
| 7850 | 9년 전 | 542 | ||
| 7849 | 9년 전 | 316 | ||
| 7848 | 9년 전 | 367 | ||
| 7847 | 9년 전 | 589 | ||
| 7846 | 9년 전 | 405 | ||
| 7845 | 9년 전 | 367 | ||
| 7844 | 9년 전 | 367 | ||
| 7843 | 9년 전 | 373 | ||
| 7842 | 9년 전 | 367 | ||
| 7841 | 9년 전 | 354 | ||
| 7840 | 9년 전 | 362 | ||
| 7839 | 9년 전 | 395 | ||
| 7838 | 9년 전 | 479 | ||
| 7837 | 9년 전 | 320 | ||
| 7836 | 9년 전 | 359 | ||
| 7835 | 9년 전 | 441 | ||
| 7834 |
|
9년 전 | 1169 | |
| 7833 | 9년 전 | 374 | ||
| 7832 | 9년 전 | 371 | ||
| 7831 | 9년 전 | 505 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기