오라클에서 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에서 이동 됨]
게시판 목록
프로그램
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 1830 |
갈색야생마
|
17년 전 | 2843 | |
| 1829 |
갈색야생마
|
17년 전 | 1590 | |
| 1828 |
갈색야생마
|
17년 전 | 1342 | |
| 1827 |
갈색야생마
|
17년 전 | 2012 | |
| 1826 |
갈색야생마
|
17년 전 | 1458 | |
| 1825 |
갈색야생마
|
17년 전 | 1398 | |
| 1824 |
갈색야생마
|
17년 전 | 1340 | |
| 1823 |
갈색야생마
|
17년 전 | 1552 | |
| 1822 |
갈색야생마
|
17년 전 | 2045 | |
| 1821 |
갈색야생마
|
17년 전 | 1426 | |
| 1820 |
갈색야생마
|
17년 전 | 1402 | |
| 1819 |
갈색야생마
|
17년 전 | 1206 | |
| 1818 |
갈색야생마
|
17년 전 | 1438 | |
| 1817 |
갈색야생마
|
17년 전 | 1167 | |
| 1816 |
갈색야생마
|
17년 전 | 1298 | |
| 1815 |
갈색야생마
|
17년 전 | 1555 | |
| 1814 |
갈색야생마
|
17년 전 | 1390 | |
| 1813 |
갈색야생마
|
17년 전 | 1289 | |
| 1812 |
갈색야생마
|
17년 전 | 1260 | |
| 1811 |
갈색야생마
|
17년 전 | 1378 | |
| 1810 |
갈색야생마
|
17년 전 | 1150 | |
| 1809 |
갈색야생마
|
17년 전 | 1201 | |
| 1808 |
갈색야생마
|
17년 전 | 1235 | |
| 1807 |
갈색야생마
|
17년 전 | 1308 | |
| 1806 |
갈색야생마
|
17년 전 | 1331 | |
| 1805 |
갈색야생마
|
17년 전 | 1336 | |
| 1804 |
갈색야생마
|
17년 전 | 1301 | |
| 1803 |
갈색야생마
|
17년 전 | 1622 | |
| 1802 | 17년 전 | 2954 | ||
| 1801 | 17년 전 | 3353 | ||
| 1800 | 17년 전 | 1446 | ||
| 1799 | 17년 전 | 1543 | ||
| 1798 | 17년 전 | 1358 | ||
| 1797 | 17년 전 | 2112 | ||
| 1796 | 17년 전 | 3025 | ||
| 1795 | 17년 전 | 1372 | ||
| 1794 | 17년 전 | 1357 | ||
| 1793 |
갈색야생마
|
17년 전 | 1354 | |
| 1792 |
갈색야생마
|
17년 전 | 1221 | |
| 1791 |
갈색야생마
|
17년 전 | 1410 | |
| 1790 |
갈색야생마
|
17년 전 | 1469 | |
| 1789 |
갈색야생마
|
17년 전 | 1277 | |
| 1788 |
갈색야생마
|
17년 전 | 2562 | |
| 1787 |
갈색야생마
|
17년 전 | 1309 | |
| 1786 |
갈색야생마
|
17년 전 | 1582 | |
| 1785 |
갈색야생마
|
17년 전 | 1456 | |
| 1784 |
갈색야생마
|
17년 전 | 1763 | |
| 1783 |
갈색야생마
|
17년 전 | 1785 | |
| 1782 | 17년 전 | 1801 | ||
| 1781 | 17년 전 | 1848 | ||
| 1780 | 17년 전 | 1510 | ||
| 1779 | 17년 전 | 1595 | ||
| 1778 |
갈색야생마
|
17년 전 | 1511 | |
| 1777 |
갈색야생마
|
17년 전 | 1855 | |
| 1776 |
갈색야생마
|
17년 전 | 1757 | |
| 1775 |
갈색야생마
|
17년 전 | 1549 | |
| 1774 |
갈색야생마
|
17년 전 | 1734 | |
| 1773 |
갈색야생마
|
17년 전 | 1402 | |
| 1772 |
갈색야생마
|
17년 전 | 1629 | |
| 1771 |
갈색야생마
|
17년 전 | 1948 | |
| 1770 |
갈색야생마
|
17년 전 | 2784 | |
| 1769 | 17년 전 | 1992 | ||
| 1768 | 17년 전 | 1398 | ||
| 1767 | 17년 전 | 1943 | ||
| 1766 | 17년 전 | 2401 | ||
| 1765 | 17년 전 | 1560 | ||
| 1764 | 17년 전 | 2316 | ||
| 1763 |
sini117
|
17년 전 | 1750 | |
| 1762 |
sini117
|
17년 전 | 1451 | |
| 1761 |
nooree
|
17년 전 | 1310 | |
| 1760 | 17년 전 | 1991 | ||
| 1759 | 17년 전 | 2881 | ||
| 1758 | 17년 전 | 2496 | ||
| 1757 | 17년 전 | 1519 | ||
| 1756 | 17년 전 | 2866 | ||
| 1755 | 17년 전 | 2401 | ||
| 1754 | 17년 전 | 2748 | ||
| 1753 | 17년 전 | 2764 | ||
| 1752 | 17년 전 | 2548 | ||
| 1751 | 17년 전 | 2365 | ||
| 1750 | 17년 전 | 1716 | ||
| 1749 | 17년 전 | 2454 | ||
| 1748 | 17년 전 | 3949 | ||
| 1747 |
|
17년 전 | 1822 | |
| 1746 | 17년 전 | 3905 | ||
| 1745 | 17년 전 | 1835 | ||
| 1744 | 17년 전 | 1728 | ||
| 1743 | 17년 전 | 2068 | ||
| 1742 | 17년 전 | 2472 | ||
| 1741 | 17년 전 | 1419 | ||
| 1740 | 17년 전 | 1765 | ||
| 1739 | 17년 전 | 2332 | ||
| 1738 | 17년 전 | 1804 | ||
| 1737 | 17년 전 | 1758 | ||
| 1736 | 17년 전 | 1539 | ||
| 1735 | 17년 전 | 1381 | ||
| 1734 | 17년 전 | 1336 | ||
| 1733 | 17년 전 | 1155 | ||
| 1732 | 17년 전 | 1140 | ||
| 1731 | 17년 전 | 1172 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기