문서유형ㅣ기술정보
분야ㅣ관리/환경설정
적용제품버전ㅣ T6, T7
문서번호ㅣTADTI136
개요
티베로에서 UNDO MONITORING을 위한 쿼리에 대하여 설명합니다.
방법
1. UNDO_RENTENTION 확인
COMMIT된 정보에 대해서 UNDO 이미지를 유지하기 위한 시간 설정 값(초 단위)을 지정합니다.
SQL> SHOW PARAMETER UNDO_RETENTION
NAME TYPE VALUE
---------------------------------------------------- -------- ------------
UNDO_RETENTION INT32 900
2. 초당 UNDO BLOCK 사용량 계산
SQL> select max(undoblks/((end_time-begin_time)*3600*24)) "UNDO_BLOCK_PER_SEC"
FROM v$undostat;
3. 적절 undo size 및 retention 타임 확인
SQL> select d.undo_size/(1024*1024) "Current UNDO SIZE",
SUBSTR(e.value,1,25) "UNDO RETENTION",
(to_number(e.value)*to_number(f.value)*g.undo_block_per_sec) / (1024*1024) "Necessary UNDO SIZE"
from (
select sum(bytes) undo_size from dba_data_files
where tablespace_name = 'UNDO'
) d,
v$parameters e,
v$parameters f,
(
select max(undoblks/((end_time-begin_time)*3600*24)) undo_block_per_sec
from v$undostat
) g
where e.name = 'UNDO_RETENTION'
and f.name = 'DB_BLOCK_SIZE';
4. 그 외 UNDO 관련 조회 쿼리
SQL> select * from v$undo_free_space;
TS_ID TS_NAME TOTAL_BLOCKS FREE_BLOCKS TOTAL_SIZE FREE_SIZE
---------- ---------- ------------ ----------- ---------- ----------
1 UNDO0 32000 25349 262144000 207659008