RDBMS/Oracle

아카이브 로그(Archive log) 관련 SQL

KSerin 2021. 1. 14. 08:23
728x90

  - 매일 적재량

    select trunc(COMPLETION_TIME) TIME, SUM(BLOCKS * BLOCK_SIZE)/1024/1024 size_MB

    from v$ARCHIVED_LOG group by trunc(completion_time);
 

- 로그파일 사이즈

   select a.group#, a.thread#, a.sequence#, a.archived, a.status, b.member as relog_file_name,

           a.bytes/1024/1024 as size_mb

   from v$log a inner join v$logfile b on a.group#=b.group# order by a.group# asc;

 

- 파일사이즈 조정

   alter system checkpoint;
   alter database drop logfile group 1;

   alter database add logfile group 1 '/data/XE/redo101.log' size 1000M;
   alter database drop logfile group 2;
   alter database add logfile group 2 '/data/XE/redo201.log'size 1000M;

   alter system switch logfile;

   alter system checkpoint;

   alter database drop logfile group 3;

   alter database add logfile group 3 '/data/XE/redo301.log' size 1000M;

   alter system switch logfile;

   alter system switch logfile;

728x90

'RDBMS > Oracle' 카테고리의 다른 글

undo tablespace  (0) 2021.01.28
Oracle DBA SQL  (0) 2021.01.28
문자셋(character set) 확인  (0) 2020.12.18
Gather statistics about objects(통계정보 생성)  (0) 2020.12.18
OBJECT 조회  (0) 2020.12.17