오라클에서 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에서 이동 됨]
게시판 목록
프로그램
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 2630 |
|
15년 전 | 818 | |
| 2629 | 15년 전 | 897 | ||
| 2628 | 15년 전 | 1089 | ||
| 2627 | 15년 전 | 1789 | ||
| 2626 |
angpang
|
15년 전 | 1105 | |
| 2625 |
|
15년 전 | 1198 | |
| 2624 | 15년 전 | 973 | ||
| 2623 | 15년 전 | 918 | ||
| 2622 | 15년 전 | 1289 | ||
| 2621 | 15년 전 | 1742 | ||
| 2620 | 15년 전 | 1021 | ||
| 2619 | 15년 전 | 1362 | ||
| 2618 |
terrorboys
|
15년 전 | 1628 | |
| 2617 |
mummy
|
15년 전 | 986 | |
| 2616 | 15년 전 | 911 | ||
| 2615 |
windday
|
15년 전 | 1062 | |
| 2614 | 15년 전 | 1124 | ||
| 2613 | 15년 전 | 936 | ||
| 2612 | 15년 전 | 1221 | ||
| 2611 | 15년 전 | 1293 | ||
| 2610 | 15년 전 | 1225 | ||
| 2609 | 15년 전 | 3142 | ||
| 2608 |
DiZiNOr
|
15년 전 | 825 | |
| 2607 | 15년 전 | 1371 | ||
| 2606 |
|
15년 전 | 945 | |
| 2605 | 15년 전 | 1762 | ||
| 2604 | 15년 전 | 724 | ||
| 2603 | 15년 전 | 884 | ||
| 2602 |
bitmaster
|
15년 전 | 902 | |
| 2601 | 15년 전 | 904 | ||
| 2600 | 15년 전 | 1645 | ||
| 2599 | 15년 전 | 2940 | ||
| 2598 | 15년 전 | 2024 | ||
| 2597 | 15년 전 | 1935 | ||
| 2596 | 15년 전 | 919 | ||
| 2595 | 15년 전 | 1022 | ||
| 2594 | 15년 전 | 967 | ||
| 2593 |
순천홈페이지
|
15년 전 | 863 | |
| 2592 | 15년 전 | 1149 | ||
| 2591 | 15년 전 | 846 | ||
| 2590 | 15년 전 | 1327 | ||
| 2589 |
dannykim
|
15년 전 | 748 | |
| 2588 |
dannykim
|
15년 전 | 653 | |
| 2587 | 15년 전 | 1533 | ||
| 2586 | 15년 전 | 797 | ||
| 2585 | 15년 전 | 1241 | ||
| 2584 | 15년 전 | 1106 | ||
| 2583 | 15년 전 | 789 | ||
| 2582 | 15년 전 | 808 | ||
| 2581 | 15년 전 | 717 | ||
| 2580 |
|
15년 전 | 696 | |
| 2579 | 15년 전 | 860 | ||
| 2578 | 15년 전 | 1119 | ||
| 2577 | 15년 전 | 2276 | ||
| 2576 |
확실한방법
|
15년 전 | 885 | |
| 2575 | 15년 전 | 977 | ||
| 2574 | 15년 전 | 998 | ||
| 2573 | 15년 전 | 995 | ||
| 2572 | 15년 전 | 1069 | ||
| 2571 |
|
15년 전 | 688 | |
| 2570 | 15년 전 | 1950 | ||
| 2569 |
|
15년 전 | 783 | |
| 2568 | 15년 전 | 1591 | ||
| 2567 | 15년 전 | 747 | ||
| 2566 |
dannykim
|
15년 전 | 761 | |
| 2565 | 15년 전 | 1423 | ||
| 2564 |
기획매니아
|
15년 전 | 1052 | |
| 2563 | 15년 전 | 1326 | ||
| 2562 | 15년 전 | 1623 | ||
| 2561 | 15년 전 | 1261 | ||
| 2560 | 15년 전 | 1349 | ||
| 2559 | 15년 전 | 720 | ||
| 2558 |
|
15년 전 | 2274 | |
| 2557 | 15년 전 | 1013 | ||
| 2556 | 15년 전 | 749 | ||
| 2555 | 15년 전 | 1093 | ||
| 2554 | 15년 전 | 797 | ||
| 2553 | 15년 전 | 2042 | ||
| 2552 | 15년 전 | 1080 | ||
| 2551 | 15년 전 | 909 | ||
| 2550 |
|
15년 전 | 999 | |
| 2549 | 15년 전 | 952 | ||
| 2548 |
|
15년 전 | 967 | |
| 2547 |
|
15년 전 | 1053 | |
| 2546 | 15년 전 | 549 | ||
| 2545 | 15년 전 | 479 | ||
| 2544 | 15년 전 | 445 | ||
| 2543 | 15년 전 | 1150 | ||
| 2542 |
|
15년 전 | 962 | |
| 2541 | 15년 전 | 810 | ||
| 2540 | 15년 전 | 801 | ||
| 2539 | 15년 전 | 1199 | ||
| 2538 | 15년 전 | 3198 | ||
| 2537 | 15년 전 | 1070 | ||
| 2536 |
|
15년 전 | 1872 | |
| 2535 | 15년 전 | 1148 | ||
| 2534 |
|
15년 전 | 966 | |
| 2533 | 15년 전 | 2604 | ||
| 2532 | 15년 전 | 1611 | ||
| 2531 |
|
15년 전 | 2507 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기