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

2014-11-24 12:23:11 · 作者: · 浏览: 2
l 9977856 Oct 27 19:27 control01.ctl
SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
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: 5110
Session ID: 1 Serial number: 5
SQL> select open_mode from v$database;
ERROR:
ORA-03114: not connected to ORACLE
SQL> exit
解决办法,只需要进行启动到mount状态下,然后clear损坏日志即可。
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
[oracle@oracle-one RHYS]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.4.0 Production on Sun Oct 27 19:28:33 2013
Copyright (c) 1982, 2013, Oracle. All rights reserved.
Connected to an idle instance.
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 unarchived logfile group 2;
Database altered.
SQL> alter database open;
Database altered.
SQL>
3、归档模式,数据库open状态、当前正在使用的日志文件损坏,并且异常关闭
数据库
模拟过程:
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 460 52428800 512 1 NO CURRENT 5397348 27-OCT-13 2.8147E+14
2 1 0 52428800 512 1 YES UNUSED 5397347 27-OCT-13 5397348 27-OCT-13
3 1 456 52428800 512 1 YES INACTIVE 5397237 27-OCT-13 5397240 27-OCT-13
4 1 457 52428800 512 1 YES INACTIVE 5397240 27-OCT-13 5397246 27-OCT-13
SQL> !rm redo01.log
SQL> !ls -l
total 3647744
-rw-r-----. 1 oracle oinstall 9977856 Oct 27 19:32 control01.ctl
-rw-r-----. 1 oracle oinstall 362422272 Oct 27 19:29 example01.dbf
-rw-r-----. 1 oracle oinstall 62922752 Oct 27 19:29 index_tablespace.dbf
-rw-r-----. 1 oracle oinstall 52429312 Oct 27 19:29 redo02.log
-rw-r-----. 1 oracle oinstall 52429312 Oct 27 19:29 redo03.log
-rw-r-----. 1 oracle oinstall 52429312 Oct 27 19:29 redo04.log
-rw-r-----. 1 oracle oinstall 52429312 Oct 25 16:45 redo4_1.log
-rw-r-----. 1 oracle oinstall 524296192 Oct 27 19:29 Rhys_Amy.dbf
-rw-r-----. 1 oracle oinstall 524296192 Oct 27 19:29 statspack.dbf
-rw-r-----. 1 oracle oinstall 671096832 Oct 27 19:29 sysaux01.dbf
-rw-r-----. 1 oracle oinstall 796925952 Oct 27 19:29 system01.dbf
-rw-r-----. 1 oracle oinstall 44048384 Oct 27 19:21 temp01.dbf
-rw-r-----. 1 oracle oinstall 524296192 Oct 27 19:29 undotbs02.dbf
-rw-r-----. 1 oracle oinstall 5251072 Oct 27 19:29 users01.dbf
SQL> shutdown abort;
ORACLE instance shut down.
SQL>
解决办法:
这时候我们有两种办法,一种是使用备份进行恢复,另一种是使用隐含参数。介绍第二种: