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

2014-11-24 12:23:11 · 作者: · 浏览: 3
ndex_tablespace.dbf
-rw-r-----. 1 oracle oinstall 52429312 Oct 27 18:06 redo01.log
-rw-r-----. 1 oracle oinstall 52429312 Oct 27 18:05 redo03.log
-rw-r-----. 1 oracle oinstall 52429312 Oct 27 18:05 redo04.log
-rw-r-----. 1 oracle oinstall 52429312 Oct 25 16:45 redo4_1.log
-rw-r-----. 1 oracle oinstall 524296192 Oct 27 18:06 Rhys_Amy.dbf
-rw-r-----. 1 oracle oinstall 524296192 Oct 27 18:06 statspack.dbf
-rw-r-----. 1 oracle oinstall 671096832 Oct 27 18:06 sysaux01.dbf
-rw-r-----. 1 oracle oinstall 796925952 Oct 27 18:06 system01.dbf
-rw-r-----. 1 oracle oinstall 44048384 Oct 27 16:18 temp01.dbf
-rw-r-----. 1 oracle oinstall 524296192 Oct 27 18:06 undotbs02.dbf
-rw-r-----. 1 oracle oinstall 5251072 Oct 27 18:06 users01.dbf
SQL> startup
ORACLE instance started.
Total System Global Area 492707840 bytes
Fixed Size 2254544 bytes
Variable Size 322963760 bytes
Database Buffers 163577856 bytes
Redo Buffers 3911680 bytes
Database mounted.
ORA-03113: end-of-file on communication channel
Process ID: 4087
Session ID: 1 Serial number: 5
日志告警
Additional information: 3
Errors in file /opt/app/oracle/diag/rdbms/rhys/RHYS/trace/RHYS_ora_4087.trc:
ORA-00313: open failed for members of log group 1 of thread
ORA-00312: online log 2 thread 1: '/opt/app/oracle/oradata/RHYS/redo02.log'
USER (ospid: 4087): terminating the instance due to error 313
System state dump requested by (instance=1, osid=4087), summary=[abnormal instance termination].
System State dumped to trace file /opt/app/oracle/diag/rdbms/rhys/RHYS/trace/RHYS_diag_4057_20131027180649.trc
Dumping diagnostic data in directory=[cdmp_20131027180649], requested by (instance=1, osid=4087), summary=[abnormal instance termination].
Instance terminated by USER, pid = 4087
恢复方法:
SQL> startup mount;
ORACLE instance started.
Total System Global Area 492707840 bytes
Fixed Size 2254544 bytes
Variable Size 322963760 bytes
Database Buffers 163577856 bytes
Redo Buffers 3911680 bytes
Database mounted.
SQL> alter database clear logfile group 2;
Database altered.
SQL> alter database open;
Database altered.
SQL>
该方法与第三中方法一样。
总结,对于不是当前使用的归档日志损坏,归档模式需要使用alter database clear unarchived 命令清空日志 组即可。对于非归档模式需要使用alter system clear
日志文件组即可。
第二、当前正在使用的日志文件损坏
1、归档模式,数据库open状态、当前正在使用的日志文件损坏
模拟过程:
QL> !ls -l
total 3698948
-rw-r-----. 1 oracle oinstall 9977856 Oct 27 18:27 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:26 redo01.log
-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:26 sysaux01.dbf
-rw-r-----. 1 oracle oinstall 796925952 Oct 27 18:26 system01.dbf
-rw-r-----. 1 oracle oinstall 44048384 Oct 27 16:18 temp01.dbf