当前位置: 首页 > Oracle, oracle 10g, oracle 11g > 正文

迁移redo文件遇到ORA-00362错误

今天在测试迁移redo日志文件时,遇到ORA-00362错误,如下:

SQL> alter database drop logfile member '/u01/app/oracle/oradata/stream/redo01.log';

alter database drop logfile member '/u01/app/oracle/oradata/stream/redo01.log'
*
ERROR at line 1:
ORA-00362: member is required to form a valid logfile in group 1
ORA-01517: log member: '/u01/app/oracle/oradata/stream/redo01.log'

这个错误是因为刚刚在logfile group 1日志组里添加了一个新的日志成员,ORACLE还没构建完成新增加的日志成员,也就是现在logfile group 1日志组里的成员状态还不一致。以下是实验过程,OEL5.4 ORACLE 10.2.0.1.0。

为logfile group 1日志组增加成员。

SQL> alter database add logfile member '/u01/app/oracle/oradata/dbdream/redo01_1.log' to group 1;

Database altered.

然后删除logfile group 1的原有成员redo01.log报错。

SQL> alter database drop logfile member '/u01/app/oracle/oradata/stream/redo01.log';

alter database drop logfile member '/u01/app/oracle/oradata/stream/redo01.log'
*
ERROR at line 1:
ORA-00362: member is required to form a valid logfile in group 1
ORA-01517: log member: '/u01/app/oracle/oradata/stream/redo01.log'

查询V$LOGFILE视图就会发现,两个member状态不一致。

SQL> select * from V$logfile where group#=1;

GROUP# STATUS  TYPE    MEMBER                                          IS_
---------- ------- ------- ----------------------------------------------- ---
1                      ONLINE  /u01/app/oracle/oradata/stream/redo01.log   NO
1 INVALID ONLINE  /u01/app/oracle/oradata/dbdream/redo01_1.log NO

切换日志,使新增加的member被使用(构建完成)。

SQL> alter system switch logfile;

System altered.

SQL> /

System altered.

SQL> /

System altered.

再次查看V$LOGFILE视图,状态正常。

SQL> select * from V$logfile where group#=1;

GROUP# STATUS  TYPE    MEMBER                                          IS_
---------- ------- ------- ----------------------------------------------- ---
1         ONLINE  /u01/app/oracle/oradata/stream/redo01.log   NO
1         ONLINE  /u01/app/oracle/oradata/dbdream/redo01_1.log NO

此时,即可删除该日志组成员。

SQL> alter database drop logfile member '/u01/app/oracle/oradata/stream/redo01.log';

Database altered.

注:当前日志组不允许删除日志组成员。

 

本文固定链接: https://www.dbdream.com.cn/2012/12/%e8%bf%81%e7%a7%bbredo%e6%96%87%e4%bb%b6%e9%81%87%e5%88%b0ora-00362%e9%94%99%e8%af%af/ | 信春哥,系统稳,闭眼上线不回滚!

该日志由 dbdream 于2012年12月24日发表在 Oracle, oracle 10g, oracle 11g 分类下, 你可以发表评论,并在保留原文地址及作者的情况下引用到你的网站或博客。
原创文章转载请注明: 迁移redo文件遇到ORA-00362错误 | 信春哥,系统稳,闭眼上线不回滚!
关键字: , , ,

迁移redo文件遇到ORA-00362错误:等您坐沙发呢!

发表评论

快捷键:Ctrl+Enter