归档模式下丢失未归档的redolog处理
归档模式下丢失未归档的redolog处理
数据库版本:ora10R2
os:linux
SQL> select * From v$version; BANNER ---------------------------------------------------------------- Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bi PL/SQL Release 10.2.0.1.0 - Production CORE 10.2.0.1.0 Production TNS for Linux: Version 10.2.0.1.0 - Production NLSRTL Version 10.2.0.1.0 - Production 确认当前日志组状态: SQL> select * From v$log; GROUP# THREAD# SEQUENCE# BYTES MEMBERS ARC STATUS ---------- ---------- ---------- ---------- ---------- --- ---------------- FIRST_CHANGE# FIRST_TIM ------------- --------- 1 1 78 52428800 1 NO INACTIVE 5609578 21-OCT-13 4 1 80 104857600 1 NO INACTIVE 5609593 21-OCT-13 3 1 81 52428800 1 NO CURRENT 5609595 21-OCT-13 GROUP# THREAD# SEQUENCE# BYTES MEMBERS ARC STATUS ---------- ---------- ---------- ---------- ---------- --- ---------------- FIRST_CHANGE# FIRST_TIM ------------- --------- 2 1 79 52428800 1 NO INACTIVE 5609581 21-OCT-13 ---手工删除相应的redolog rm -rf /oracle/oradata/lixora/redo01.log SQL> alter database clear logfile group 1; alter database clear logfile group 1 * ERROR at line 1: ORA-00350: log 1 of instance lixora (thread 1) needs to be archived ORA-00312: online log 1 thread 1: '/oracle/oradata/lixora/redo01.log' SQL> alter database clear unarchived logfile group 1; Database altered. -----打开数据库 SQL> alter database open; Database altered. -----再次确认redolog状态 SQL> select * From v$log; GROUP# THREAD# SEQUENCE# BYTES MEMBERS ARC STATUS ---------- ---------- ---------- ---------- ---------- --- ---------------- FIRST_CHANGE# FIRST_TIM ------------- --------- 1 1 82 52428800 1 NO CURRENT 5629603 21-OCT-13 2 1 79 52428800 1 YES INACTIVE 5609581 21-OCT-13 3 1 81 52428800 1 YES INACTIVE 5609595 21-OCT-13 GROUP# THREAD# SEQUENCE# BYTES MEMBERS ARC STATUS ---------- ---------- ---------- ---------- ---------- --- ---------------- FIRST_CHANGE# FIRST_TIM ------------- --------- 4 1 80 104857600 1 YES INACTIVE 5609593 21-OCT-13 ----手工切换几次 SQL> alter system switch logfile; System altered. SQL> / System altered. SQL> select * from v$log; GROUP# THREAD# SEQUENCE# BYTES MEMBERS ARC STATUS ---------- ---------- ---------- ---------- ---------- --- ---------------- FIRST_CHANGE# FIRST_TIM ------------- --------- 1 1 82 52428800 1 YES ACTIVE 5629603 21-OCT-13 2 1 83 52428800 1 YES ACTIVE 5630462 21-OCT-13 3 1 81 52428800 1 YES INACTIVE 5609595 21-OCT-13 GROUP# THREAD# SEQUENCE# BYTES MEMBERS ARC STATUS ---------- ---------- ---------- ---------- ---------- --- ---------------- FIRST_CHANGE# FIRST_TIM ------------- --------- 4 1 84 104857600 1 NO CURRENT 5630464 21-OCT-13