异构Active DataGuard对于convert参数的错误理解
在配置异构ADG环境时常常使用如下参数进行实施:
*.db_file_name_convert='/oradata/ORADB','/oradata/ORADBDG','/oradata/ORADB/datafile','/oradata/ORADBDG/datafile'
*.log_file_name_convert='/oradata/ORADB','/oradata/ORADBDG','/oradata/ORADB/onlinelog','/oradata/ORADBDG/onlinelog'
该参数使用在ADG初始化阶段实际上是不规范的
正确处理异构的问题,应该是在备份集恢复阶段,在RMAN代码中使用:
RMAN> run {
allocate channel c1 device type disk;
allocate channel c2 device type disk;
allocate channel c3 device type disk;
set newname for database to '/oradata/ORADBDG/%b'; --使用该参数
restore database;
switch datafile all; --配合该参数,更新控制文件中的数据文件路径指向最新的副本
switch tempfile all; --配合该参数
recover database;
}
但是convert参数在使用duplicate for standby复制出来备库是没问题,可以生效的。
但是若数据库没有设置convert参数需要在duplicate 指定set new name
RMAN>run {
allocate channel prmy1 type disk;
allocate channel prmy2 type disk;
allocate channel prmy3 type disk;
allocate channel prmy4 type disk;
allocate auxiliary channel aux1 type disk;
allocate auxiliary channel aux2 type disk;
allocate auxiliary channel aux3 type disk;
allocate auxiliary channel aux4 type disk;
set newname for tempfile 1 to '/oradata/ORADBDG';
duplicate target database for standby from active database dorecover nofilenamecheck;
}