Oracle 重做日志恢复(二)

2、非当前日志组所有成员丢失(数据库打不开,只丢失单个就没影响,全丢失了就打不开到open状态)
解决方法:alter database clear logfile group 2  清理该组的所有成员日志即可
(清理一下该日志组的文件信息,因为日志组的状态时inactive,所有的脏块已经写入数据库,这样在启动时就不会进行校验了,此时数据库可以正常启动,当使用到该日志组的时候会自动创建日志组成员)
05:19:42 SQL> select * from v$log;
GROUP#    THREAD#  SEQUENCE#      BYTES    MEMBERS ARC STATUS           FIRST_CHANGE# FIRST_TIM
---------- ---------- ---------- ---------- ---------- --- ---------------- ------------- ---------
1          1         12   10485760          2 NO  CURRENT                 386507 02-AUG-11
3          1         11   10485760          2 NO  INACTIVE                386505 02-AUG-11
2          1         10   10485760          2 NO  INACTIVE                385481 02-AUG-11
05:19:45 SQL>
05:19:45 SQL> shutdown
ORA-01109: database not open
Database dismounted.
ORACLE instance shut down.
05:19:59 SQL> !
[oracle@oracle ~]$ rm /disk2/lx02/oradata/redo02a.log
[oracle@oracle ~]$ rm /disk1/lx02/oradata/redo02b.log
[oracle@oracle ~]$ !sql
sqlplus '/as sysdba'
SQL*Plus: Release 10.2.0.1.0 - Production on Tue Aug 2 05:20:21 2011
Copyright (c) 1982, 2005, Oracle.  All rights reserved.
Connected to an idle instance.
05:20:22 SQL> startup
ORACLE instance started.
Total System Global Area  251658240 bytes
Fixed Size                  1218820 bytes
Variable Size             125830908 bytes
Database Buffers          121634816 bytes
Redo Buffers                2973696 bytes
Database mounted.
ORA-00313: open failed for members of log group 2 of thread 1
ORA-00312: online log 2 thread 1: '/disk2/lx02/oradata/redo02a.log'
ORA-00312: online log 2 thread 1: '/disk1/lx02/oradata/redo02b.log'
05:20:29 SQL> alter database clear logfile group 2;清理组所有的日志文件,当使用该日志组文件时会自动创建日志组成员
Database altered.
05:21:00 SQL> alter database open;
Database altered.


CUUG

更多oracle视频教程请点击:http://crm2.qq.com/page/portalpage/wpa.php?uin=800060152&f=1&ty=1&aty=0&a=&from=6

你可能感兴趣的:(oracle,oracle数据库,database,Oracle重做日志恢复)