oracle 归档模式下删除current日志不完全恢复

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了oracle 归档模式下删除current日志不完全恢复相关的知识,希望对你有一定的参考价值。

归档模式

[email protected]> archive log list
Database log mode          Archive Mode
Automatic archival         Enabled
Archive destination        /u01/app/oracle/product/11.2.0/dbhome_1/dbs/arch
Oldest online log sequence     5
Next log sequence to archive   7
Current log sequence           7

查看日志组

[email protected]> select group#,status from v$log;

    GROUP# STATUS
---------- ----------------
     1 INACTIVE
     2 CURRENT
     3 INACTIVE

查看current日志组文件路径

select member from v$logfile;

MEMBER
------------------------------------------------------------------------------------------------------------------------
/u01/app/oracle/oradata/orcl/redo03.log
/u01/app/oracle/oradata/orcl//redo02.log
/u01/app/oracle/oradata/orcl//redo01.log

删除日志文件
rm -rf /u01/app/oracle/oradata/orcl/redo02.log
启动数据库报错

[email protected]> startup
ORACLE instance started.

Total System Global Area  835104768 bytes
Fixed Size          2257840 bytes
Variable Size         536874064 bytes
Database Buffers      289406976 bytes
Redo Buffers            6565888 bytes
Database mounted.
ORA-03113: end-of-file on communication channel
Process ID: 2821
Session ID: 125 Serial number: 

查看trace alert日志,提示找不到文件

ORA-00313: open failed for members of log group 2 of thread 1
ORA-00312: online log 2 thread 1: ‘/u01/app/oracle/oradata/orcl/redo02.log‘
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3

进行恢复

recover database until cancel;
alter database open resetlogs;

以上是关于oracle 归档模式下删除current日志不完全恢复的主要内容,如果未能解决你的问题,请参考以下文章

Oracle RMAN删除归档日志脚本

Oracle RMAN删除归档日志脚本

归档模式下怎么查询oracle 10g归档日志存放的路径?

如何删除oracle的归档日志

oracle 如何关闭打开归档日志的方法

Oracle归档日志