今天做RMAN恢复,数据库为10.2.0.5,从单机到RAC。
打开数据库的时候出现下面的错误。
-
RMAN> alter database open resetlogs;
-
RMAN-00571: ===========================================================
-
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
-
RMAN-00571: ===========================================================
-
RMAN-03002: failure of alter db command at 08/10/2015 09:53:07
-
ORA-00344: unable to re-create online log '/oradata/outdb/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 /oradata/outdb/redo01.log NO
-
2 ONLINE /oradata/outdb/redo02.log NO
-
3 ONLINE /oradata/outdb/redo03.log NO
-
4 ONLINE /oradata/outdb/redo04.log NO
-
5 ONLINE /oradata/outdb/redo05.log NO
-
6 ONLINE /oradata/outdb/redo06.log NO
-
7 ONLINE /oradata/outdb/redo07.log NO
-
8 ONLINE /oradata/outdb/redo08.log NO
-
9 ONLINE /oradata/outdb/redo09.log NO
-
10 ONLINE /oradata/outdb/redo10.log NO
查询结果可以看出日志路径不是ASM里面的路径,所以需要对路径进行修改。
执行下面的语句修改路径:
-
SQL> alter database rename file '/oradata/outdb/redo01.log' to '+DATADG/otdb/onlinelog/redo01.log';
-
alter database rename file '/oradata/outdb/redo02.log' to '+DATADG/otdb/onlinelog/redo02.log';
-
alter database rename file '/oradata/outdb/redo03.log' to '+DATADG/otdb/onlinelog/redo03.log';
-
alter database rename file '/oradata/outdb/redo04.log' to '+DATADG/otdb/onlinelog/redo04.log';
-
。。。。。。。。。
修改完之后再重新打开数据库,打开正常。
open
-
[oracle@otdb1 ~]$ sqlplus / as sysdba
-
-
SQL*Plus: Release 10.2.0.5.0 - Production on Mon Aug 10 10:03:01 2015
-
-
Copyright (c) 1982, 2010, Oracle. All Rights Reserved.
-
-
-
Connected to:
-
Oracle Database 10g Enterprise Edition Release 10.2.0.5.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 +DATADG/otdb/onlinelog/redo01.log NO
-
2 ONLINE +DATADG/otdb/onlinelog/redo02.log NO
-
3 ONLINE +DATADG/otdb/onlinelog/redo03.log NO
-
4 ONLINE +DATADG/otdb/onlinelog/redo04.log NO
-
5 ONLINE +DATADG/otdb/onlinelog/redo05.log NO
-
6 ONLINE +DATADG/otdb/onlinelog/redo06.log NO
-
7 ONLINE +DATADG/otdb/onlinelog/redo07.log NO
-
8 ONLINE +DATADG/otdb/onlinelog/redo08.log NO
-
9 ONLINE +DATADG/otdb/onlinelog/redo09.log NO
-
10 ONLINE +DATADG/otdb/onlinelog/redo10.log NO
这次过程也提醒我以后做rman恢复时要注意日志的路径,提前修改,避免后面的错误。
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/205377/viewspace-1767221/
,如需转载,请注明出处,否则将追究法律责任。