오라클에서 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에서 이동 됨]
게시판 목록
프로그램
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 1730 | 17년 전 | 1182 | ||
| 1729 | 17년 전 | 1613 | ||
| 1728 | 17년 전 | 1680 | ||
| 1727 | 17년 전 | 1818 | ||
| 1726 | 17년 전 | 2954 | ||
| 1725 | 17년 전 | 2092 | ||
| 1724 |
|
17년 전 | 1770 | |
| 1723 |
끝없는사랑
|
17년 전 | 2113 | |
| 1722 |
끝없는사랑
|
17년 전 | 1822 | |
| 1721 | 17년 전 | 3349 | ||
| 1720 | 17년 전 | 1532 | ||
| 1719 | 17년 전 | 1650 | ||
| 1718 |
사랑합니다
|
17년 전 | 1368 | |
| 1717 | 17년 전 | 2189 | ||
| 1716 | 17년 전 | 3143 | ||
| 1715 |
|
17년 전 | 2278 | |
| 1714 |
|
17년 전 | 1734 | |
| 1713 | 17년 전 | 2992 | ||
| 1712 | 17년 전 | 4428 | ||
| 1711 | 17년 전 | 1739 | ||
| 1710 | 17년 전 | 3241 | ||
| 1709 |
jeans
|
17년 전 | 1566 | |
| 1708 |
|
17년 전 | 3476 | |
| 1707 | 17년 전 | 5841 | ||
| 1706 |
|
17년 전 | 1420 | |
| 1705 |
|
17년 전 | 2159 | |
| 1704 | 17년 전 | 1792 | ||
| 1703 |
심심맨닷컴
|
17년 전 | 1552 | |
| 1702 | 17년 전 | 2427 | ||
| 1701 |
|
17년 전 | 2630 | |
| 1700 | 17년 전 | 1600 | ||
| 1699 | 17년 전 | 2683 | ||
| 1698 |
RedRiverFisher
|
17년 전 | 3170 | |
| 1697 |
심심맨닷컴
|
17년 전 | 1528 | |
| 1696 |
eclub
|
17년 전 | 1940 | |
| 1695 | 17년 전 | 3850 | ||
| 1694 |
깜장고무신
|
17년 전 | 4479 | |
| 1693 |
stuartkim
|
17년 전 | 1883 | |
| 1692 |
stuartkim
|
17년 전 | 1751 | |
| 1691 |
|
17년 전 | 2680 | |
| 1690 | 17년 전 | 1846 | ||
| 1689 | 17년 전 | 3934 | ||
| 1688 | 17년 전 | 1656 | ||
| 1687 | 16년 전 | 1930 | ||
| 1686 |
|
17년 전 | 2260 | |
| 1685 | 17년 전 | 2107 | ||
| 1684 |
|
17년 전 | 3573 | |
| 1683 |
leeLook
|
17년 전 | 1593 | |
| 1682 | 17년 전 | 2655 | ||
| 1681 | 17년 전 | 1645 | ||
| 1680 | 17년 전 | 1909 | ||
| 1679 | 17년 전 | 7421 | ||
| 1678 | 17년 전 | 1996 | ||
| 1677 | 17년 전 | 4093 | ||
| 1676 | 17년 전 | 2416 | ||
| 1675 | 17년 전 | 2426 | ||
| 1674 | 17년 전 | 2150 | ||
| 1673 | 17년 전 | 2197 | ||
| 1672 | 17년 전 | 2626 | ||
| 1671 | 17년 전 | 3220 | ||
| 1670 | 17년 전 | 5331 | ||
| 1669 |
플래시007
|
17년 전 | 2785 | |
| 1668 |
|
17년 전 | 2697 | |
| 1667 | 17년 전 | 2551 | ||
| 1666 |
|
17년 전 | 1797 | |
| 1665 | 17년 전 | 2207 | ||
| 1664 | 17년 전 | 5307 | ||
| 1663 |
|
17년 전 | 3023 | |
| 1662 |
|
17년 전 | 2580 | |
| 1661 |
|
17년 전 | 3256 | |
| 1660 |
|
17년 전 | 2473 | |
| 1659 |
|
17년 전 | 2830 | |
| 1658 | 17년 전 | 5878 | ||
| 1657 | 17년 전 | 2633 | ||
| 1656 |
Piece
|
17년 전 | 2020 | |
| 1655 |
|
17년 전 | 2654 | |
| 1654 | 17년 전 | 1475 | ||
| 1653 | 17년 전 | 9800 | ||
| 1652 | 17년 전 | 4460 | ||
| 1651 | 17년 전 | 3289 | ||
| 1650 | 17년 전 | 1813 | ||
| 1649 | 17년 전 | 3603 | ||
| 1648 | 17년 전 | 2289 | ||
| 1647 | 17년 전 | 3735 | ||
| 1646 | 17년 전 | 5190 | ||
| 1645 | 17년 전 | 3846 | ||
| 1644 | 17년 전 | 2700 | ||
| 1643 | 17년 전 | 2946 | ||
| 1642 | 18년 전 | 2453 | ||
| 1641 | 18년 전 | 2794 | ||
| 1640 |
porgy
|
18년 전 | 1901 | |
| 1639 | 18년 전 | 3451 | ||
| 1638 |
컴퓨터기술자
|
18년 전 | 2141 | |
| 1637 |
|
18년 전 | 2261 | |
| 1636 | 18년 전 | 2074 | ||
| 1635 | 18년 전 | 3050 | ||
| 1634 |
귀여운현호
|
18년 전 | 1998 | |
| 1633 |
태양의서쪽
|
18년 전 | 2675 | |
| 1632 | 18년 전 | 3875 | ||
| 1631 | 18년 전 | 4570 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기