记录生产库恢复时遇到的ORA-00392 ORA-00312报错,此库之前是做fio测试把FRA磁盘剔除掉的,之前剔除掉后,昨天又重新加载FRA磁盘 FRA是external冗余,使用以下命令加载磁盘组后我就没做后续创建目录操作
create diskgroup FRA external redundancy disk '/dev/oracleasm/disks/ASMDISK3' name FRA_0001;
然后进行数据库还原恢复,操作过程省略
进行recover database时提示
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: recover 命令 (在 07/30/2024 14:28:59 上) 失败
RMAN-06054: 介质恢复正在请求未知的线程 1 序列 9700 的归档日志以及起始 SCN 11859454437044
进行recover database until scn操作
RMAN> recover database until scn 11859454437044;
成功执行后,在alter database open resetlogs时提示报错ORA-00344ORA-17502 ORA-15173
于是在FRA盘路径下创建datafile的目录重新open操作,于是报了ORA-00392 ORA-00312错误
解决办法
SQL> ho oerr ora 00392
00392, 00000, "log %s of thread %s is being cleared, operation not allowed"
// *Cause: An operation encountered this online log in the middle of being
// cleared. The command that began the clearing may have terminated
// without completing the clearing.
// *Action: If the clear command is still executing then wait for its
// completion. If it terminated then reissue the clear command, or
// drop the log.
查询v$log,显示status 为clear
SQL> select group#,bytes/1024/1024||'M',status from v$log;
GROUP# BYTES/1024/1024||'M' STATUS
---------- ----------------------------------------- ----------------
11 2048M CLEARING_CURRENT
12 2048M CLEARING
13 2048M CLEARING
14 2048M CLEARING
15 2048M CLEARING_CURRENT
16 2048M CLEARING
直接清理日志组,重新open resetlogs操作
SQL> ALTER DATABASE CLEAR LOGFILE GROUP 11;
RMAN> alter database open resetlogs;
继续清理日志组 ,重新open resetlogs操作
SQL> ALTER DATABASE CLEAR LOGFILE GROUP 15;
RMAN> alter database open resetlogs;
成功打开
剩下操作是启动节点2,发现启动失败,原因是节点2读取的控制文件是老旧的FRA盘上的控制文件,但是在剔除FRA盘时已经把控制文件迁移到DATA盘,于是把节点1的参数文件传到节点2,重新启动成功。