oracle 日志文件删除,修改,报错处理
一,恢复非当前的日志组
[oracle@zwc primarydb]$ rm -rf redo01*
SYS@zwcdb:~>startup
ORACLE instance started.
Total System Global Area 285212672 bytes
Fixed SIZE 1218992 bytes
Variable SIZE 96470608 bytes
DATABASE Buffers 184549376 bytes
Redo Buffers 2973696 bytes
DATABASE mounted.
ORA-00313: OPEN failed FOR members OF log GROUP 1 OF thread 1
ORA-00312: online log 1 thread 1: ‘/u01/app/oracle/oradata/primarydb/redo01.log‘
ORA-00312: online log 1 thread 1: ‘/u01/app/oracle/oradata/primarydb/redo01_.log‘
SYS@zwcdb:~>ALTER DATABASE clear logfile GROUP 1;
DATABASE altered.
SYS@zwcdb:~>ALTER DATABASE OPEN;
DATABASE altered.
二,恢复当前日志组
SYS@zwcdb:~>startup
ORACLE instance started.
Total System Global Area 285212672 bytes
Fixed SIZE 1218992 bytes
Variable SIZE 96470608 bytes
DATABASE Buffers 184549376 bytes
Redo Buffers 2973696 bytes
DATABASE mounted.
ORA-00313: OPEN failed FOR members OF log GROUP 1 OF thread 1
ORA-00312: online log 1 thread 1: ‘/u01/app/oracle/oradata/primarydb/redo01.log‘
ORA-00312: online log 1 thread 1: ‘/u01/app/oracle/oradata/primarydb/redo01_.log‘
SYS@zwcdb:~>recover DATABASE until cancel;
Media recovery complete.
SYS@zwcdb:~>ALTER DATABASE OPEN resetlogs;
DATABASE altered.
SYS@zwcdb:~>SELECT a.GROUP#,a.TYPE,b.STATUS,b.bytes/1024/1024||‘M‘ "SIZE",a.member,a.is_recovery_dest_file
FROM v$logfile a,v$log b WHERE a.GROUP#=b.GROUP# ORDER BY 1;
GROUP# TYPE STATUS SIZE MEMBER IS_RECOVERY_DEST_FILE
- , 1 ONLINE INACTIVE 50M /u01/app/oracle/oradata/primarydb/redo01.log NO
- 1 ONLINE INACTIVE 50M /u01/app/oracle/oradata/primarydb/redo01_.log NO
- 2 ONLINE CURRENT 50M /u01/app/oracle/oradata/primarydb/redo02_.log NO
- 2 ONLINE CURRENT 50M /u01/app/oracle/oradata/primarydb/redo02.log NO
- 3 ONLINE UNUSED 50M /u01/app/oracle/oradata/primarydb/redo03_.log NO
- 3 ONLINE UNUSED 50M /u01/app/oracle/oradata/primarydb/redo03.log NO
- 6 ROWS selected.
三,以上都无效时,可选择强制忽略日志检查
执行
1,alter system set "_allow_resetlogs_corruption"=true scope=spfile;
2,然后startup数据库
郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。