오라클에서 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에서 이동 됨]
게시판 목록
프로그램
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 2530 |
|
15년 전 | 2612 | |
| 2529 |
|
15년 전 | 1324 | |
| 2528 | 15년 전 | 1028 | ||
| 2527 | 15년 전 | 1498 | ||
| 2526 | 15년 전 | 899 | ||
| 2525 | 15년 전 | 1198 | ||
| 2524 | 15년 전 | 1092 | ||
| 2523 | 15년 전 | 1492 | ||
| 2522 |
NY더지더지
|
15년 전 | 1632 | |
| 2521 | 15년 전 | 901 | ||
| 2520 |
|
15년 전 | 1310 | |
| 2519 |
|
15년 전 | 1102 | |
| 2518 | 15년 전 | 931 | ||
| 2517 |
|
15년 전 | 1007 | |
| 2516 | 15년 전 | 1321 | ||
| 2515 | 15년 전 | 762 | ||
| 2514 | 15년 전 | 946 | ||
| 2513 | 15년 전 | 2599 | ||
| 2512 |
|
15년 전 | 1415 | |
| 2511 |
|
15년 전 | 784 | |
| 2510 |
|
15년 전 | 815 | |
| 2509 | 15년 전 | 1260 | ||
| 2508 | 15년 전 | 1293 | ||
| 2507 | 15년 전 | 1548 | ||
| 2506 | 15년 전 | 1026 | ||
| 2505 | 15년 전 | 1395 | ||
| 2504 |
JMoon
|
15년 전 | 692 | |
| 2503 |
|
15년 전 | 1041 | |
| 2502 | 15년 전 | 1303 | ||
| 2501 | 15년 전 | 2716 | ||
| 2500 | 15년 전 | 1079 | ||
| 2499 | 15년 전 | 1052 | ||
| 2498 | 15년 전 | 951 | ||
| 2497 |
첫만남의감격
|
15년 전 | 827 | |
| 2496 |
|
15년 전 | 838 | |
| 2495 |
|
15년 전 | 3430 | |
| 2494 |
soulfuleyes
|
15년 전 | 2804 | |
| 2493 | 15년 전 | 1985 | ||
| 2492 | 15년 전 | 2433 | ||
| 2491 | 15년 전 | 1522 | ||
| 2490 | 15년 전 | 1066 | ||
| 2489 | 15년 전 | 1062 | ||
| 2488 | 15년 전 | 2338 | ||
| 2487 | 15년 전 | 881 | ||
| 2486 | 15년 전 | 1926 | ||
| 2485 |
못말리는크리스
|
15년 전 | 727 | |
| 2484 |
|
15년 전 | 1877 | |
| 2483 | 15년 전 | 811 | ||
| 2482 | 15년 전 | 2485 | ||
| 2481 | 15년 전 | 729 | ||
| 2480 | 15년 전 | 1162 | ||
| 2479 | 15년 전 | 710 | ||
| 2478 |
|
15년 전 | 2881 | |
| 2477 | 15년 전 | 1258 | ||
| 2476 | 15년 전 | 1290 | ||
| 2475 | 15년 전 | 1299 | ||
| 2474 | 15년 전 | 1364 | ||
| 2473 | 15년 전 | 977 | ||
| 2472 | 15년 전 | 1735 | ||
| 2471 | 15년 전 | 1263 | ||
| 2470 | 15년 전 | 844 | ||
| 2469 | 15년 전 | 2701 | ||
| 2468 | 15년 전 | 1091 | ||
| 2467 | 15년 전 | 1288 | ||
| 2466 | 15년 전 | 1086 | ||
| 2465 | 15년 전 | 1939 | ||
| 2464 | 15년 전 | 1952 | ||
| 2463 | 15년 전 | 1614 | ||
| 2462 | 15년 전 | 968 | ||
| 2461 | 15년 전 | 1207 | ||
| 2460 | 15년 전 | 900 | ||
| 2459 | 15년 전 | 837 | ||
| 2458 | 15년 전 | 1082 | ||
| 2457 | 15년 전 | 2443 | ||
| 2456 | 15년 전 | 2467 | ||
| 2455 | 15년 전 | 1447 | ||
| 2454 | 15년 전 | 994 | ||
| 2453 | 15년 전 | 1145 | ||
| 2452 | 15년 전 | 1157 | ||
| 2451 | 15년 전 | 1020 | ||
| 2450 | 15년 전 | 921 | ||
| 2449 | 15년 전 | 851 | ||
| 2448 | 15년 전 | 1212 | ||
| 2447 | 15년 전 | 1163 | ||
| 2446 | 15년 전 | 910 | ||
| 2445 | 15년 전 | 877 | ||
| 2444 | 15년 전 | 1051 | ||
| 2443 | 15년 전 | 1528 | ||
| 2442 | 15년 전 | 1054 | ||
| 2441 | 15년 전 | 1385 | ||
| 2440 |
|
15년 전 | 1219 | |
| 2439 | 15년 전 | 1892 | ||
| 2438 |
|
15년 전 | 2951 | |
| 2437 |
|
15년 전 | 2284 | |
| 2436 |
|
15년 전 | 884 | |
| 2435 |
|
15년 전 | 1893 | |
| 2434 |
|
15년 전 | 2084 | |
| 2433 |
|
15년 전 | 1380 | |
| 2432 | 15년 전 | 1360 | ||
| 2431 | 15년 전 | 2625 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기