恢复测试数据库时遇到了日志组不让删的情况。 因为这个测试数据库是从RAC克隆而来,每个节点都有独立的REDO LOG FILE,变成单实例后, 只有节点1的REDO LOG FILE再用,那就把节点2的删掉吧,再删节点2的REDO LOG FILE时,遇到了ORA-01567错误。 SQL> select b.thread#,a.group#,a.member,bytes/1024/1024,b.members from v$logfile a,v$log b where a.group#=b.group# THREAD# GROUP# MEMBER BYTES/1024/1024 MEMBERS ---------- ---------- -------------------------------------------------------------------------------- --------------- ---------- 1 1 /u01/app/oracle/fast_recovery_area/ORCL/onlinelog/o1_mf_1_kk0nkxxb_.log 500 1 1 3 /u01/app/oracle/fast_recovery_area/ORCL/onlinelog/o1_mf_3_kk0nkyjm_.log 500 1 2 13 /u01/app/oracle/fast_recovery_area/ORCL/onlinelog/o1_mf_13_kk0nkzw0_.log 500 1 2 16 /u01/app/oracle/fast_recovery_area/ORCL/onlinelog/o1_mf_16_kk0nl2xt_.log 500 1 SQL> select group#,thread#,sequence#,members,status from v$log; GROUP# THREAD# SEQUENCE# MEMBERS STATUS ---------- ---------- ---------- ---------- ---------------- 1 1 7 1 INACTIVE 3 1 8 1 CURRENT 13 2 1 1 INACTIVE 16 2 0 1 UNUSED 尝试直接删除THREAD=2对应的日志文件组13,16 SQL> alter database drop logfile group 13; alter database drop logfile group 13 * ERROR at line 1: ORA-01567: dropping log 1 would leave less than 2 log files for instance orcl (thread 2) ORA-00312: online log 13 thread 2: ' /u01/app/oracle/fast_recovery_area/ORCL/onlinelog/o1_mf_13_kk0nkzw0_.log' 在节点2的REDO LOG FILE就剩2个的时候,就不让删了,这是REDO的机制,每个节点不能少于2个日志组,如果少于2个日志无法切换了。 解决方法很简单,把节点2给踢出去就行了。 SQL> alter database disable THREAD 2; Database altered. SQL> alter database drop logfile group 13; Database altered. SQL> alter database drop logfile group 16; Database altered. 然后还得去操作系统上把这些删除掉的REDO LOG FILE删掉。
?
|