重庆思庄Oracle、Redhat认证学习论坛

标题: ORA-00344: unable to re-create online log [打印本页]

作者: 王亮    时间: 2020-9-6 16:00
标题: ORA-00344: unable to re-create online log
今天做RMAN恢复

打开数据库的时候出现下面的错误。
RMAN> alter database open resetlogs;
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of alter db command at 09/05/2020 09:53:07
ORA-00344: unable to re-create online log '/u01/app/oradata/orcl/redo01.log'
ORA-27040: file create error, unable to create file
Linux-x86_64 Error: 2: No such file or directory
查看当前系统redo log路径
SQL> select * from v$logfile;

    GROUP# STATUS TYPE MEMBER IS_
---------- ------- ------- -------------------------------------------------- ---
         1 ONLINE /u01/app/oradata/orcl/redo01.log NO
         2 ONLINE /u01/app/oradata/orcl/redo02.log NO
         3 ONLINE /u01/app/oradata/orcl/redo03.log NO
查询结果可以看出日志路径不是恢复之后目标库的路径,所以需要对路径进行修改。
执行下面的语句修改路径:
SQL:

SQL> alter database rename file '/u01/app/oradata/orcl/redo01.log' to 'C:/APP/WANG/ORADATA/REDO01.log';
alter database rename file '/u01/app/oradata/orcl/redo02.log' to 'C:/APP/WANG/ORADATA/REDO02.log';
alter database rename file '/u01/app/oradata/orcl/redo03.log' to 'C:/APP/WANG/ORADATA/REDO03.log';
修改完之后再重新打开数据库
[oracle@otdb1 ~]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.4.0 - Production on Sat Sep 05 10:03:01 2020
Copyright (c) 1982, 2005, Oracle. All Rights Reserved.
Connected to:
Oracle Database 05g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, Real Application Clusters, Data Mining and Real Application Testing options
SQL> alter database open resetlogs;
Database altered.
SQL> select open_mode from v$database;
OPEN_MODE
----------
READ WRITE
最新的日志路径:
v$logfile
SQL> select * from v$logfile;

    GROUP# STATUS TYPE MEMBER IS_
---------- ------- ------- -------------------------------------------------- ---
         1 ONLINE C:/APP/WANG/ORADATA/redo01.log NO
         2 ONLINE C:/APP/WANG/ORADATA/redo02.log NO
         3 ONLINE C:/APP/WANG/ORADATA/redo03.log NO






欢迎光临 重庆思庄Oracle、Redhat认证学习论坛 (http://bbs.cqsztech.com/) Powered by Discuz! X3.2