오라클에서 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에서 이동 됨]
게시판 목록
프로그램
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 2430 | 15년 전 | 2504 | ||
| 2429 | 15년 전 | 5495 | ||
| 2428 | 15년 전 | 1461 | ||
| 2427 |
Sizkein
|
15년 전 | 4227 | |
| 2426 | 15년 전 | 1354 | ||
| 2425 | 15년 전 | 1649 | ||
| 2424 | 15년 전 | 1618 | ||
| 2423 |
haejuksun
|
15년 전 | 1611 | |
| 2422 |
haejuksun
|
15년 전 | 1118 | |
| 2421 |
haejuksun
|
15년 전 | 1363 | |
| 2420 |
haejuksun
|
15년 전 | 1509 | |
| 2419 |
|
15년 전 | 1404 | |
| 2418 |
|
15년 전 | 2131 | |
| 2417 |
원더풀라입
|
15년 전 | 1280 | |
| 2416 |
원더풀라입
|
15년 전 | 1331 | |
| 2415 |
원더풀라입
|
15년 전 | 875 | |
| 2414 |
원더풀라입
|
15년 전 | 995 | |
| 2413 |
원더풀라입
|
15년 전 | 955 | |
| 2412 |
원더풀라입
|
15년 전 | 921 | |
| 2411 |
원더풀라입
|
15년 전 | 870 | |
| 2410 |
원더풀라입
|
15년 전 | 925 | |
| 2409 |
원더풀라입
|
15년 전 | 1075 | |
| 2408 |
원더풀라입
|
15년 전 | 1082 | |
| 2407 |
원더풀라입
|
15년 전 | 2605 | |
| 2406 |
원더풀라입
|
15년 전 | 941 | |
| 2405 |
원더풀라입
|
15년 전 | 1594 | |
| 2404 |
원더풀라입
|
15년 전 | 1461 | |
| 2403 | 15년 전 | 1587 | ||
| 2402 | 15년 전 | 1291 | ||
| 2401 |
나도빌더만들까
|
15년 전 | 1772 | |
| 2400 | 15년 전 | 594 | ||
| 2399 | 15년 전 | 1084 | ||
| 2398 | 15년 전 | 1050 | ||
| 2397 | 15년 전 | 2837 | ||
| 2396 | 15년 전 | 3151 | ||
| 2395 | 15년 전 | 1828 | ||
| 2394 | 15년 전 | 1336 | ||
| 2393 |
gamebomb
|
15년 전 | 1956 | |
| 2392 |
gamebomb
|
15년 전 | 1464 | |
| 2391 |
gamebomb
|
15년 전 | 1063 | |
| 2390 | 15년 전 | 3760 | ||
| 2389 |
leadK
|
15년 전 | 1405 | |
| 2388 |
kim7031
|
15년 전 | 1507 | |
| 2387 | 15년 전 | 2731 | ||
| 2386 | 15년 전 | 1436 | ||
| 2385 | 15년 전 | 4165 | ||
| 2384 |
확실한방법
|
15년 전 | 2370 | |
| 2383 |
intel
|
15년 전 | 3148 | |
| 2382 |
확실한방법
|
15년 전 | 1757 | |
| 2381 |
|
15년 전 | 1989 | |
| 2380 |
|
15년 전 | 1300 | |
| 2379 | 15년 전 | 4373 | ||
| 2378 | 15년 전 | 3944 | ||
| 2377 |
메가팩토리
|
15년 전 | 3771 | |
| 2376 | 15년 전 | 5180 | ||
| 2375 | 15년 전 | 3405 | ||
| 2374 | 15년 전 | 1786 | ||
| 2373 | 15년 전 | 1745 | ||
| 2372 | 15년 전 | 1888 | ||
| 2371 | 15년 전 | 1591 | ||
| 2370 | 15년 전 | 3988 | ||
| 2369 | 15년 전 | 2898 | ||
| 2368 | 15년 전 | 2094 | ||
| 2367 | 15년 전 | 1663 | ||
| 2366 | 15년 전 | 1903 | ||
| 2365 | 15년 전 | 2382 | ||
| 2364 | 15년 전 | 1474 | ||
| 2363 | 15년 전 | 2408 | ||
| 2362 | 15년 전 | 1728 | ||
| 2361 | 15년 전 | 1823 | ||
| 2360 | 15년 전 | 1472 | ||
| 2359 | 15년 전 | 2165 | ||
| 2358 | 15년 전 | 1496 | ||
| 2357 |
|
15년 전 | 1915 | |
| 2356 |
헐크매니아
|
15년 전 | 2115 | |
| 2355 |
WebRIA
|
15년 전 | 1190 | |
| 2354 |
WebRIA
|
15년 전 | 1240 | |
| 2353 |
WebRIA
|
15년 전 | 1886 | |
| 2352 |
WebRIA
|
15년 전 | 5329 | |
| 2351 | 15년 전 | 1626 | ||
| 2350 |
WebRIA
|
15년 전 | 2139 | |
| 2349 | 15년 전 | 2340 | ||
| 2348 |
WebRIA
|
15년 전 | 1488 | |
| 2347 |
WebRIA
|
15년 전 | 1297 | |
| 2346 |
WebRIA
|
15년 전 | 2214 | |
| 2345 |
WebRIA
|
15년 전 | 4935 | |
| 2344 | 15년 전 | 2201 | ||
| 2343 | 15년 전 | 2862 | ||
| 2342 | 15년 전 | 1750 | ||
| 2341 | 15년 전 | 3592 | ||
| 2340 | 15년 전 | 4428 | ||
| 2339 | 15년 전 | 3111 | ||
| 2338 | 15년 전 | 2353 | ||
| 2337 | 15년 전 | 2434 | ||
| 2336 | 15년 전 | 2684 | ||
| 2335 | 15년 전 | 2165 | ||
| 2334 |
Sizkein
|
15년 전 | 5507 | |
| 2333 | 15년 전 | 3370 | ||
| 2332 | 16년 전 | 1354 | ||
| 2331 | 16년 전 | 1695 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기