oracle 歸檔模式下刪除current日誌不完全恢復

歸檔模式

SYS@orcl> 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

查看日誌組

SYS@orcl> 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
啓動數據庫報錯

SYS@orcl> 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;
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章