본문 바로가기
Oracle/백업&복구

Redo log 관리 - 리두 로그 그룹 증가 & 멤버 추가

by 취미툰 2020. 1. 8.
반응형

리두 로그(Redo log?)

- 오라클이 데이터베이스에서 발생한 모든 변경사항을 기록하는 파일입니다.

- DBWR이 작동하기 전에 LGWR이 먼저 리두 로그 버퍼 캐시에 리두 로그를 작성합니다.

 

리두로그 파일 조회

sql> select group#,sequence#,members,status from v$log;

 

  GROUP#  SEQUENCE#    MEMBERS STATUS

---------- ---------- ---------- ----------------

  1       1114          1 CURRENT

  2       1112          1 INACTIVE

  3       1113          1 ACTIVE

 

리두 로그 그룹 추가

sql> alter database add logfile group 4 '/app/oracle/oradata/ysbae/redo04.log' size 10M;

 

Database altered.

 

sql> select * from v$logfile;

 

    GROUP# STATUS  TYPE    MEMBER                         IS_RECOVERY_DEST_FIL

---------- ------- ------- ------------------------------ --------------------

         3 (null)  ONLINE  /app/oracle/oradata/ysbae/redo NO

                           03.log

 

         2 (null)  ONLINE  /app/oracle/oradata/ysbae/redo NO

                           02.log

 

         1 (null)  ONLINE  /app/oracle/oradata/ysbae/redo NO

                           01.log

 

         4 (null)  ONLINE  /app/oracle/oradata/ysbae/redo NO

                           04.log

 

리두 로그 멤버 추가

 

sql> alter database add logfile member '/app/oracle/oradata/ysbae/redo01_02.log' to group 1;

 

Database altered.

 

 

sql> alter database add logfile member '/app/oracle/oradata/ysbae/redo02_02.log' to group 2

 

Database altered.

 

sql> alter database add logfile member '/app/oracle/oradata/ysbae/redo03_02.log' to group 3

 

Database altered.

 

 

sql> alter database add logfile member '/app/oracle/oradata/ysbae/redo04_02.log' to group 4

 

Database altered.

 

추가된 리두로그 파일 확인

sql> select * from v$logfile;

 

GROUP# STATUS  TYPE    MEMBER                                    RECOVERY_DEST_FIL

---------- ------- ------- ------------------------------        ----------------

         3 (null)  ONLINE  /app/oracle/oradata/ysbae/redo03.log                                                                                

         2 (null)  ONLINE  /app/oracle/oradata/ysbae/redo02.log                                                                                

         1 (null)  ONLINE  /app/oracle/oradata/ysbae/redo01.log                                                                            

         4 (null)  ONLINE  /app/oracle/oradata/ysbae/redo04.log           

         1 INVALID ONLINE  /app/oracle/oradata/ysbae/redo01_02.log                                                                    

         2 INVALID ONLINE  /app/oracle/oradata/ysbae/redo02_02.log                                                              

         3 INVALID ONLINE  /app/oracle/oradata/ysbae/redo03_02.log                                                                       

         4 INVALID ONLINE  /app/oracle/oradata/ysbae/redo04_02.log   

 

8 rows selected.

반응형

댓글