redo日志损坏恢复总结(五)

2014-11-24 12:23:11 · 作者: · 浏览: 1
-rw-r-----. 1 oracle oinstall 524296192 Oct 27 18:26 undotbs02.dbf
-rw-r-----. 1 oracle oinstall 5251072 Oct 27 18:10 users01.dbf
SQL> archive log list;
Database log mode Archive Mode
Automatic archival Enabled
Archive destination USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence 447
Next log sequence to archive 450
Current log sequence 450
SQL> set linesize 200
SQL> select * from v$log;
GROUP# THREAD# SEQUENCE# BYTES BLOCKSIZE MEMBERS ARC STATUS FIRST_CHANGE# FIRST_TIM NEXT_CHANGE# NEXT_TIME
---------- ---------- ---------- ---------- ---------- ---------- --- ---------------- ------------- --------- ------------ ---------
1 1 450 52428800 512 1 NO CURRENT 5388976 27-OCT-13 2.8147E+14
2 1 0 52428800 512 1 YES UNUSED 5388970 27-OCT-13 5388976 27-OCT-13
3 1 447 52428800 512 1 YES INACTIVE 5388964 27-OCT-13 5388967 27-OCT-13
4 1 448 52428800 512 1 YES INACTIVE 5388967 27-OCT-13 5388970 27-OCT-13
SQL> !rm redo01.log
SQL> !ls -l
total 3647744
-rw-r-----. 1 oracle oinstall 9977856 Oct 27 18:28 control01.ctl
-rw-r-----. 1 oracle oinstall 362422272 Oct 27 18:10 example01.dbf
-rw-r-----. 1 oracle oinstall 62922752 Oct 27 18:10 index_tablespace.dbf
-rw-r-----. 1 oracle oinstall 52429312 Oct 27 18:10 redo02.log
-rw-r-----. 1 oracle oinstall 52429312 Oct 27 18:10 redo03.log
-rw-r-----. 1 oracle oinstall 52429312 Oct 27 18:10 redo04.log
-rw-r-----. 1 oracle oinstall 52429312 Oct 25 16:45 redo4_1.log
-rw-r-----. 1 oracle oinstall 524296192 Oct 27 18:10 Rhys_Amy.dbf
-rw-r-----. 1 oracle oinstall 524296192 Oct 27 18:10 statspack.dbf
-rw-r-----. 1 oracle oinstall 671096832 Oct 27 18:28 sysaux01.dbf
-rw-r-----. 1 oracle oinstall 796925952 Oct 27 18:28 system01.dbf
-rw-r-----. 1 oracle oinstall 44048384 Oct 27 16:18 temp01.dbf
-rw-r-----. 1 oracle oinstall 524296192 Oct 27 18:28 undotbs02.dbf
-rw-r-----. 1 oracle oinstall 5251072 Oct 27 18:10 users01.dbf
SQL>
日志信息提示:
Additional information: 3
Errors in file /opt/app/oracle/diag/rdbms/rhys/RHYS/trace/RHYS_arc2_4228.trc:
ORA-00313: open failed for members of log group 1 of thread 1
ORA-00312: online log 1 thread 1: '/opt/app/oracle/oradata/RHYS/redo01.log'
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
Master background archival failure: 313
解决方法:
由于这个时候,虽然当前日志是正在被使用的,但是我们可以先进行切换日志之后,然后执行clear操作。
SQL> alter system checkpoint;
System altered.
SQL> !rm redo01.log;
SQL> alter system checkpoint;
System altered.
SQL> alter database clear unarchived logfile group 1;
alter database clear unarchived logfile group 1
*
ERROR at line 1:
ORA-01624: log 1 needed for crash recovery of instance RHYS (thread 1)
ORA-00312: online log 1 thread 1: '/opt/app/oracle/oradata/RHYS/redo01.log'
SQL> alter database switch logfile;
alter database switch logfile
*
ERROR at line 1:
ORA-02000: missing ALL keyword
SQL> alter system switch logfile;
System altered.
SQL> select * from v$log;
GROUP# THREAD# SEQUENCE# BYTES BLOCKSIZE MEMBERS ARC STATUS FIRST_CHANGE# F