오라클에서 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에서 이동 됨]
게시판 목록
프로그램
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 1430 | 18년 전 | 2975 | ||
| 1429 | 18년 전 | 2921 | ||
| 1428 | 18년 전 | 2815 | ||
| 1427 | 18년 전 | 2127 | ||
| 1426 |
|
18년 전 | 2308 | |
| 1425 |
|
18년 전 | 2863 | |
| 1424 |
|
18년 전 | 2957 | |
| 1423 |
frotone
|
18년 전 | 4116 | |
| 1422 | 18년 전 | 6109 | ||
| 1421 | 18년 전 | 2044 | ||
| 1420 | 18년 전 | 2177 | ||
| 1419 | 18년 전 | 1885 | ||
| 1418 | 18년 전 | 1645 | ||
| 1417 | 18년 전 | 2630 | ||
| 1416 | 18년 전 | 1686 | ||
| 1415 | 18년 전 | 1556 | ||
| 1414 | 18년 전 | 4732 | ||
| 1413 | 18년 전 | 1787 | ||
| 1412 | 18년 전 | 1832 | ||
| 1411 | 18년 전 | 1839 | ||
| 1410 | 18년 전 | 1964 | ||
| 1409 | 18년 전 | 3624 | ||
| 1408 | 18년 전 | 1647 | ||
| 1407 | 18년 전 | 1517 | ||
| 1406 | 18년 전 | 1349 | ||
| 1405 | 18년 전 | 1853 | ||
| 1404 | 18년 전 | 1898 | ||
| 1403 |
frotone
|
18년 전 | 3644 | |
| 1402 | 18년 전 | 1970 | ||
| 1401 | 18년 전 | 3105 | ||
| 1400 | 18년 전 | 4726 | ||
| 1399 | 18년 전 | 2858 | ||
| 1398 | 18년 전 | 8043 | ||
| 1397 | 18년 전 | 4051 | ||
| 1396 |
|
18년 전 | 2737 | |
| 1395 | 18년 전 | 1519 | ||
| 1394 | 18년 전 | 2616 | ||
| 1393 | 18년 전 | 5036 | ||
| 1392 | 18년 전 | 5216 | ||
| 1391 |
cncafe
|
18년 전 | 2087 | |
| 1390 |
mixdesign
|
18년 전 | 4348 | |
| 1389 | 18년 전 | 4088 | ||
| 1388 |
mixdesign
|
18년 전 | 4141 | |
| 1387 | 18년 전 | 2260 | ||
| 1386 | 18년 전 | 4182 | ||
| 1385 |
mixdesign
|
18년 전 | 2168 | |
| 1384 | 18년 전 | 3275 | ||
| 1383 | 18년 전 | 4908 | ||
| 1382 | 18년 전 | 1946 | ||
| 1381 |
오디세우스
|
18년 전 | 3401 | |
| 1380 |
mixdesign
|
18년 전 | 1635 | |
| 1379 | 18년 전 | 2732 | ||
| 1378 |
mixdesign
|
18년 전 | 1657 | |
| 1377 | 18년 전 | 2706 | ||
| 1376 |
|
18년 전 | 2546 | |
| 1375 |
|
18년 전 | 1548 | |
| 1374 |
|
18년 전 | 1487 | |
| 1373 |
|
18년 전 | 1732 | |
| 1372 | 18년 전 | 2235 | ||
| 1371 | 18년 전 | 2012 | ||
| 1370 | 18년 전 | 2375 | ||
| 1369 | 18년 전 | 4908 | ||
| 1368 |
mixdesign
|
18년 전 | 1813 | |
| 1367 | 18년 전 | 1252 | ||
| 1366 | 18년 전 | 1375 | ||
| 1365 | 18년 전 | 1329 | ||
| 1364 | 18년 전 | 1075 | ||
| 1363 | 18년 전 | 1072 | ||
| 1362 | 18년 전 | 1400 | ||
| 1361 | 18년 전 | 1357 | ||
| 1360 | 18년 전 | 2346 | ||
| 1359 | 18년 전 | 1222 | ||
| 1358 | 18년 전 | 1602 | ||
| 1357 | 18년 전 | 2087 | ||
| 1356 | 18년 전 | 1273 | ||
| 1355 | 18년 전 | 2823 | ||
| 1354 | 18년 전 | 1268 | ||
| 1353 | 18년 전 | 1645 | ||
| 1352 | 18년 전 | 1493 | ||
| 1351 | 18년 전 | 1447 | ||
| 1350 | 18년 전 | 1230 | ||
| 1349 | 18년 전 | 1075 | ||
| 1348 | 18년 전 | 1661 | ||
| 1347 | 18년 전 | 1098 | ||
| 1346 | 18년 전 | 3611 | ||
| 1345 | 18년 전 | 1706 | ||
| 1344 |
mixdesign
|
18년 전 | 1785 | |
| 1343 | 18년 전 | 1110 | ||
| 1342 | 18년 전 | 1847 | ||
| 1341 | 18년 전 | 1093 | ||
| 1340 | 18년 전 | 1163 | ||
| 1339 | 18년 전 | 1013 | ||
| 1338 | 18년 전 | 1001 | ||
| 1337 | 18년 전 | 1092 | ||
| 1336 |
|
18년 전 | 2571 | |
| 1335 | 18년 전 | 1542 | ||
| 1334 | 18년 전 | 1633 | ||
| 1333 | 18년 전 | 1201 | ||
| 1332 | 18년 전 | 1869 | ||
| 1331 | 18년 전 | 1515 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기