主库和备库数据库文件名不同时,resync不成功

《Dataguard Concepts and Administration》文档中12.9.3 Standby Database File Names Are Different From Primary Database
有描述对文件名不同时的处理情况

SQL> select name from v$datafile;

NAME
--------------------------------------------------------------------------------
/u01/app/oracle/oradata/cdr1/orcl/system01.dbf
/u01/app/oracle/oradata/cdr1/orcl/sysaux01.dbf
/u01/app/oracle/oradata/cdr1/orcl/undotbs01.dbf
/u01/app/oracle/oradata/cdr1/orcl/pdbseed/system01.dbf
/u01/app/oracle/oradata/cdr1/orcl/users01.dbf
/u01/app/oracle/oradata/cdr1/orcl/pdbseed/sysaux01.dbf
/u01/app/oracle/oradata/cdr1/orcl/pdborcl/system01.dbf
/u01/app/oracle/oradata/cdr1/orcl/pdborcl/sysaux01.dbf
/u01/app/oracle/oradata/cdr1/orcl/pdborcl/SAMPLE_SCHEMA_users01.dbf
/u01/app/oracle/oradata/cdr1/orcl/pdborcl/example01.dbf
/u01/app/oracle/oradata/cdr1/orcl/pdborcl/soe01

NAME
--------------------------------------------------------------------------------
/u01/app/oracle/oradata/cdr1/orcl/ex1.dbf
/u01/app/oracle/oradata/cdr1/orcl/soe.dbf

13 rows selected.

使用下面的脚本进行恢复

RUN 
{
SET NEWNAME FOR DATAFILE 1 TO '/u01/app/oracle/oradata/orcl/system01.dbf';
SET NEWNAME FOR DATAFILE 3 TO '/u01/app/oracle/oradata/orcl/sysaux01.dbf';
SET NEWNAME FOR DATAFILE 4 TO '/u01/app/oracle/oradata/orcl/undotbs01.dbf';
SET NEWNAME FOR DATAFILE 5 TO '/u01/app/oracle/oradata/orcl/pdbseed/system01.dbf';
SET NEWNAME FOR DATAFILE 6 TO '/u01/app/oracle/oradata/orcl/users01.dbf';
SET NEWNAME FOR DATAFILE 7 TO '/u01/app/oracle/oradata/orcl/pdbseed/sysaux01.dbf';
SET NEWNAME FOR DATAFILE 8 TO '/u01/app/oracle/oradata/orcl/pdborcl/system01.dbf';
SET NEWNAME FOR DATAFILE 9 TO '/u01/app/oracle/oradata/orcl/pdborcl/sysaux01.dbf';
SET NEWNAME FOR DATAFILE 10 TO '/u01/app/oracle/oradata/orcl/pdborcl/SAMPLE_SCHEMA_users01.dbf';
SET NEWNAME FOR DATAFILE 11 TO '/u01/app/oracle/oradata/orcl/pdborcl/example01.dbf';
SET NEWNAME FOR DATAFILE 12 TO '/u01/app/oracle/oradata/orcl/pdborcl/soe01';
SET NEWNAME FOR DATAFILE 13 TO '/u01/app/oracle/oradata/orcl/ex1.dbf';
SET NEWNAME FOR DATAFILE 14 TO '/u01/app/oracle/oradata/orcl/soe.dbf';
RESTORE DATABASE;
SWITCH DATAFILE ALL; 
RECOVER DATABASE NOREDO;
}

出错

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 09/04/2020 11:52:34
RMAN-06026: some targets not found - aborting restore
RMAN-06100: no channel to restore a backup or copy of datafile 4

undo表空间不能这样恢复,直接拷贝。

姚远ACE CSDN认证博客专家 ACE 华为云 MVP
Oracle ACE,华为云 MVP,Oracle10g,12c OCM; MySQL 5.6,5.7,8.0 OCP;CCNA; EMC Certified; IBM P Certified; RHCE; SQLServer 764; DB2 Certified; TOEIC 890;获得过两次国家部级科技进步奖;发明过两项计算机专利。微信:yaoyuanace 邮箱:yaoyuanace(at)qq.com
已标记关键词 清除标记
相关推荐
<p> <b><span style="background-color:#FFE500;">【超实用课程内容】</span></b> </p> <p> <br /> </p> <p> <br /> </p> <p> 本课程内容包含讲解<span>解读Nginx的基础知识,</span><span>解读Nginx的核心知识、带领学员进行</span>高并发环境下的Nginx性能优化实战,让学生能够快速将所学融合到企业应用中。 </p> <p> <br /> </p> <p style="font-family:Helvetica;color:#3A4151;font-size:14px;background-color:#FFFFFF;"> <b><br /> </b> </p> <p style="font-family:Helvetica;color:#3A4151;font-size:14px;background-color:#FFFFFF;"> <b><span style="background-color:#FFE500;">【课程如何观看?】</span></b> </p> <p style="font-family:Helvetica;color:#3A4151;font-size:14px;background-color:#FFFFFF;"> PC端:<a href="https://edu.csdn.net/course/detail/26277"><span id="__kindeditor_bookmark_start_21__"></span></a><a href="https://edu.csdn.net/course/detail/27216">https://edu.csdn.net/course/detail/27216</a> </p> <p style="font-family:Helvetica;color:#3A4151;font-size:14px;background-color:#FFFFFF;"> 移动端:CSDN 学院APP(注意不是CSDN APP哦) </p> <p style="font-family:Helvetica;color:#3A4151;font-size:14px;background-color:#FFFFFF;"> 本课程为录播课,课程永久有效观看长,大家可以抓紧间学习后一起讨论哦~ </p> <p style="font-family:"color:#3A4151;font-size:14px;background-color:#FFFFFF;"> <br /> </p> <p class="ql-long-24357476" style="font-family:"color:#3A4151;font-size:14px;background-color:#FFFFFF;"> <strong><span style="background-color:#FFE500;">【学员专享增值服务】</span></strong> </p> <p class="ql-long-24357476" style="font-family:"color:#3A4151;font-size:14px;background-color:#FFFFFF;"> <b>源码开放</b> </p> <p class="ql-long-24357476" style="font-family:"color:#3A4151;font-size:14px;background-color:#FFFFFF;"> 课件、课程案例代码完全开放给你,你可以根据所学知识,自行修改、优化 </p> <p class="ql-long-24357476" style="font-family:"color:#3A4151;font-size:14px;background-color:#FFFFFF;"> 下载方式:电脑登录<a href="https://edu.csdn.net/course/detail/26277"></a><a href="https://edu.csdn.net/course/detail/27216">https://edu.csdn.net/course/detail/27216</a>,播放页面右侧点击课件进行资料打包下载 </p> <p> <br /> </p> <p> <br /> </p> <p> <br /> </p>
©️2020 CSDN 皮肤主题: Age of Ai 设计师:meimeiellie 返回首页