Admin/B&R

Current redolog의 member손상의 복구방법

Qhtlr 2007. 7. 21. 16:43

Current redolog의 member손상의 복구방법

alert.log 에러메시지

Errors in file /oracle/app/oracle/admin/IMAN7/bdump/iman7_lgwr_26328.trc:
ORA-00313: open failed for members of log group 1 of thread 1
ORA-00312: online log 1 thread 1: '/home2/IMAN7/redoIMAN701.log'
ORA-27037: unable to obtain file status
SVR4 Error: 2: No such file or directory
Additional information: 3
Thu Jul 15 14:37:10 2004
Errors in file /oracle/app/oracle/admin/IMAN7/bdump/iman7_lgwr_26328.trc:
ORA-00321: log 1 of thread 1, cannot update log file header
ORA-00312: online log 1 thread 1: '/home2/IMAN7/redoIMAN701.log'
Thu Jul 15 14:37:10 2004
Errors in file /oracle/app/oracle/admin/IMAN7/bdump/iman7_lgwr_26328.trc:
ORA-00313: open failed for members of log group 1 of thread 1
Thread 1 advanced to log sequence 287
  Current log# 1 seq# 287 mem# 1: /oracle/app/oracle/oradata/IMAN7/redoIMAN701b.log

시나리오
========

GROUP#     STATUS  MEMBER
---------- ------- -----------------------------------------------------------------------------
         1         /home2/IMAN7/redoIMAN701.log
         2         /oracle/app/oracle/oradata/IMAN7/redoIMAN702.log
         3         /oracle/app/oracle/oradata/IMAN7/redoIMAN703.log
         1         /oracle/app/oracle/oradata/IMAN7/redoIMAN701b.log
         2         /home2/IMAN7/redoIMAN702b.log
         3         /home2/IMAN7/redoIMAN703b.log
6 rows selected.

SVRMGR> select * from v$log;
GROUP#     THREAD#    SEQUENCE#  BYTES      MEMBERS    ARC STATUS           FIRST_CHAN FIRST_TIM
---------- ---------- ---------- ---------- ---------- --- ---------------- ---------- ---------
         1          1        287    1048576          2 NO  CURRENT          7.2340E+12 15-JUL-04
         2          1        286   10485760          2 YES INACTIVE         7.2340E+12 15-JUL-04
         3          1        285   10485760          2 YES INACTIVE         7.2340E+12 15-JUL-04
3 rows selected.


rm /home2/IMAN7/redoIMAN701.log

*) Log Switch를 발생 시켜 손상된 Redo-Log file이 Active On-Line Redo-Log 상태에서
   InActive 상태로 바뀌도록 조치 한다.

SVRMGR> alter system switch logfile;
Statement processed.
SVRMGR> select * from v$log;
GROUP#     THREAD#    SEQUENCE#  BYTES      MEMBERS    ARC STATUS           FIRST_CHAN FIRST_TIM
---------- ---------- ---------- ---------- ---------- --- ---------------- ---------- ---------
         1          1        287    1048576          2 YES ACTIVE           7.2340E+12 15-JUL-04
         2          1        286   10485760          2 YES INACTIVE         7.2340E+12 15-JUL-04
         3          1        288   10485760          2 NO  CURRENT          7.2340E+12 15-JUL-04
3 rows selected.
SVRMGR> alter system switch logfile;
Statement processed.
SVRMGR> select * from v$log;
GROUP#     THREAD#    SEQUENCE#  BYTES      MEMBERS    ARC STATUS           FIRST_CHAN FIRST_TIM
---------- ---------- ---------- ---------- ---------- --- ---------------- ---------- ---------
         1          1        287    1048576          2 YES INACTIVE         7.2340E+12 15-JUL-04
         2          1        289   10485760          2 NO  CURRENT          7.2340E+12 15-JUL-04
         3          1        288   10485760          2 YES INACTIVE         7.2340E+12 15-JUL-04
3 rows selected.

SVRMGR> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SVRMGR> startup mount
ORACLE instance started.
Total System Global Area                          5585328 bytes
Fixed Size                                          51632 bytes
Variable Size                                     5046272 bytes
Database Buffers                                   409600 bytes
Redo Buffers                                        77824 bytes
Database mounted.
SVRMGR> select * from v$logfile;
GROUP#     STATUS  MEMBER
---------- ------- -------------------------------------------------------------------------------
         1 INVALID /home2/IMAN7/redoIMAN701.log
         2         /oracle/app/oracle/oradata/IMAN7/redoIMAN702.log
         3         /oracle/app/oracle/oradata/IMAN7/redoIMAN703.log
         1         /oracle/app/oracle/oradata/IMAN7/redoIMAN701b.log
         2         /home2/IMAN7/redoIMAN702b.log
         3         /home2/IMAN7/redoIMAN703b.log
6 rows selected.


SVRMGR> alter database drop logfile member '/home2/IMAN7/redoIMAN701.log';
Statement processed.
SVRMGR> select * from v$logfile;
GROUP#     STATUS  MEMBER
---------- ------- ------------------------------------------------------------------------------
         2         /oracle/app/oracle/oradata/IMAN7/redoIMAN702.log
         3         /oracle/app/oracle/oradata/IMAN7/redoIMAN703.log
         1         /oracle/app/oracle/oradata/IMAN7/redoIMAN701b.log
         2         /home2/IMAN7/redoIMAN702b.log
         3         /home2/IMAN7/redoIMAN703b.log
5 rows selected.
SVRMGR> alter database add logfile member '/home2/IMAN7/redoIMAN701.log' to group 1;
Statement processed.
SVRMGR> select * from v$logfile;
GROUP#     STATUS  MEMBER
---------- ------- ------------------------------------------------------------------------------
         1 INVALID /home2/IMAN7/redoIMAN701.log
         2         /oracle/app/oracle/oradata/IMAN7/redoIMAN702.log
         3         /oracle/app/oracle/oradata/IMAN7/redoIMAN703.log
         1         /oracle/app/oracle/oradata/IMAN7/redoIMAN701b.log
         2         /home2/IMAN7/redoIMAN702b.log
         3         /home2/IMAN7/redoIMAN703b.log
6 rows selected.


SVRMGR> alter database open;
Statement processed.