053-003
3.Your database is in ARCHIVELOG mode. You have two online redo log groups, each of which contains
one redo member. When you attempt to start the database, you receive the following errors:
ORA-00313: open failed for members of log group 1 of thread 1
ORA-00312: online log 1 thread 1: 'D:\REDO01.LOG'
You discover that the online redo log file of the current redo group is corrupted.
Which statement should you use to resolve this issue?
A. ALTER DATABASE DROP LOGFILE GROUP 1;
B. ALTER DATABASE CLEAR LOGFILE GROUP 1;
C. ALTER DATABASE CLEAR UNARCHIVED LOGFILE GROUP 1;
D. ALTER DATABASE DROP LOGFILE MEMBER 'D:\REDO01.LOG';
Answer: C
解析:
sys@ORCL> startup mount;
sys@ORCL> alter database archivelog;
sys@ORCL> archive log list;
Database log mode Archive Mode
Automatic archival Enabled
Archive destination USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence 5
Next log sequence to archive 7
Current log sequence 7
sys@ORCL> select * from v$logfile;
GROUP# STATUS TYPE MEMBER IS_
---------- ------- ------- -------------------------------------------------- ---
3 ONLINE /u01/app/oracle/oradata/orcl/redo03.log NO
2 ONLINE /u01/app/oracle/oradata/orcl/redo02.log NO
1 ONLINE /u01/app/oracle/oradata/orcl/redo01.log NO
sys@ORCL> select group#,status from v$log;
GROUP# STATUS
---------- ----------------
1 CURRENT
3 INACTIVE
2 INACTIVE
sys@ORCL> shutdown immediate;
[oracle@demo ~]$ rm /u01/app/oracle/oradata/orcl/redo01.log
[oracle@demo ~]$ sqlplus / as sysdba
idle> startup
ORACLE instance started.
Total System Global Area 839282688 bytes
Fixed Size 2233000 bytes
Variable Size 583011672 bytes
Database Buffers 251658240 bytes
Redo Buffers 2379776 bytes
Database mounted.
ORA-03113: end-of-file on communication channel
Process ID: 18413
Session ID: 1 Serial number: 5
[oracle@demo trace]$ tail -20 alert_orcl.log
ORA-00313: open failed for members of log group 1 of thread 1
ORA-00312: online log 1 thread 1: '/u01/app/oracle/oradata/orcl/redo01.log'
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
Errors in file /u01/app/oracle/diag/rdbms/orcl/orcl/trace/orcl_lgwr_18335.trc:
ORA-00313: open failed for members of log group 1 of thread 1
ORA-00312: online log 1 thread 1: '/u01/app/oracle/oradata/orcl/redo01.log'
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
ARC0: STARTING ARCH PROCESSES
Errors in file /u01/app/oracle/diag/rdbms/orcl/orcl/trace/orcl_ora_18413.trc:
ORA-00313: open failed for members of log group 1 of thread
ORA-00312: online log 1 thread 1: '/u01/app/oracle/oradata/orcl/redo01.log'
[oracle@demo ~]$ sqlplus / as sysdba
idle> startup mount
idle> alter database clear unarchived logfile group 1;
Database altered.
idle> alter database open;
Database altered.
idle> select status from v$instance;
STATUS
------------
OPEN
Online Redo Log 状态说明:
1. CURRENT --current writing
2. ACTIVE --instance recovery 需要用到,脏块未完全写入数据文件(脏块未刷到datafile或未归档完成才会是active)
3. INACTIVE --已归档
如果日志已归档(INACTIVE ),则只需要 alter database clear logfile ,否则(active状态下,只是日志未归档,脏块已刷到了datafile) alter database clear unarchived logfile group 2. 如果脏块未刷到 datafile ,就需要做不完全恢复了.