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

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 2493|回复: 0
打印 上一主题 下一主题

[备份恢复] RMAN RAC 到 单实例 duplicate报ORA-19505 错误

[复制链接]
跳转到指定楼层
楼主
发表于 2018-12-26 17:12:40 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
用RMAN Duplicate来搭建RAC 到 单实例的Data Guard,结果在duplicate时,出现如下报错:
RMAN> duplicate target database forstandby nofilenamecheck from active database;
Starting Duplicate Db at 26-DEC-18
using target database control file insteadof recovery catalog
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: SID=20 devicetype=DISK
allocated channel: ORA_AUX_DISK_2
channel ORA_AUX_DISK_2: SID=21 devicetype=DISK
allocated channel: ORA_AUX_DISK_3
channel ORA_AUX_DISK_3: SID=22 devicetype=DISK
allocated channel: ORA_AUX_DISK_4
channel ORA_AUX_DISK_4: SID=23 devicetype=DISK
contents of Memory Script:
{
  backup as copy reuse
  targetfile '/u01/app/oracle/product/11.2.0/db_1/dbs/orapworcl1' auxiliary format
'/u01/app/oracle/product/11.2.0/db_1/dbs/orapworcl'   ;
}
executing Memory Script
Starting backup at 26-DEC-18
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=59 instance=orcl2device type=DISK
allocated channel: ORA_DISK_2
channel ORA_DISK_2: SID=55 instance=orcl2device type=DISK
allocated channel: ORA_DISK_3
channel ORA_DISK_3: SID=1 instance=orcl1device type=DISK
allocated channel: ORA_DISK_4
channel ORA_DISK_4: SID=37 instance=orcl2device type=DISK
RMAN-00571:===========================================================
RMAN-00569: =============== ERROR MESSAGESTACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of Duplicate Db commandat 12/26/2018 14:47:34
RMAN-05501: aborting duplication of targetdatabase
RMAN-03015: error occurred in stored scriptMemory Script
RMAN-03009: failure of backup command onORA_DISK_1 channel at 12/26/2018 14:47:33
ORA-19505: failed toidentify file "/u01/app/oracle/product/11.2.0/db_1/dbs/orapworcl1"
ORA-27037: unable toobtain file status
Linux-x86_64 Error: 2: Nosuch file or directory
Additional information: 3

报错原因:


查看rac环境下的tns配置
[oracle@db1 admin]$vi tnsnames.ora
# tnsnames.oraNetwork Configuration File:/u01/app/oracle/product/11.2.0/db_1/network/admin/tnsnames.ora
# Generated byOracle configuration tools.
ORCL =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = db-scan)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = orcl)
    )
  )
ORCL1 =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST =strong)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = orcl)
    )
  )

报错原因:
tns配置文件中的host使用的db-scan集群名,意味着当rman执行复制数据库时,备库既要找节点1又要找节点2的密码文件,因为只拷贝了节点1的密码文件,所以报错。

解决办法:
需要修改tns配置文件host为单个节点IP地址;
[oracle@db1 admin]$vi tnsnames.ora
# tnsnames.oraNetwork Configuration File:/u01/app/oracle/product/11.2.0/db_1/network/admin/tnsnames.ora
# Generated byOracle configuration tools.
ORCL =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.161)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = orcl)
    )
  )
ORCL1 =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST =strong)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = orcl)
   )

  )

再执行复制数据库成功:
RMAN>  duplicate target database for standbynofilenamecheck from active database;
Starting DuplicateDb at 26-DEC-18
using targetdatabase control file instead of recovery catalog
allocated channel:ORA_AUX_DISK_1
channel ORA_AUX_DISK_1:SID=20 device type=DISK
allocated channel:ORA_AUX_DISK_2
channelORA_AUX_DISK_2: SID=21 device type=DISK
allocated channel:ORA_AUX_DISK_3
channelORA_AUX_DISK_3: SID=22 device type=DISK
allocated channel:ORA_AUX_DISK_4
channelORA_AUX_DISK_4: SID=23 device type=DISK
contents of MemoryScript:
{
   backup as copy reuse
   targetfile '/u01/app/oracle/product/11.2.0/db_1/dbs/orapworcl1' auxiliary format
'/u01/app/oracle/product/11.2.0/db_1/dbs/orapworcl'   ;
}
executing MemoryScript
Starting backup at26-DEC-18
allocated channel:ORA_DISK_1
channel ORA_DISK_1:SID=66 instance=orcl1 device type=DISK
allocated channel:ORA_DISK_2
channel ORA_DISK_2:SID=1 instance=orcl1 device type=DISK
allocated channel:ORA_DISK_3
channel ORA_DISK_3:SID=64 instance=orcl1 device type=DISK
allocated channel:ORA_DISK_4
channel ORA_DISK_4:SID=59 instance=orcl1 device type=DISK
Finished backup at26-DEC-18
contents of MemoryScript:
{
   backup as copy current controlfile forstandby auxiliary format  '/u01/app/oracle/oradata/orcl1/control01.ctl';
   restore clone controlfile to '/u01/app/oracle/fast_recovery_area/orcl1/control02.ctl' from
'/u01/app/oracle/oradata/orcl1/control01.ctl';
}
executing MemoryScript
Starting backup at26-DEC-18
using channelORA_DISK_1
using channelORA_DISK_2
using channelORA_DISK_3
using channelORA_DISK_4
channel ORA_DISK_1:starting datafile copy
copying standbycontrol file
output filename=/u01/app/oracle/product/11.2.0/db_1/dbs/snapcf_orcl1.ftag=TAG20181226T141917 RECID=5 STAMP=995897959
channel ORA_DISK_1:datafile copy complete, elapsed time: 00:00:03
Finished backup at26-DEC-18
Starting restore at26-DEC-18
using channelORA_AUX_DISK_1
using channelORA_AUX_DISK_2
using channelORA_AUX_DISK_3
using channelORA_AUX_DISK_4
channelORA_AUX_DISK_2: skipped, AUTOBACKUP already found
channelORA_AUX_DISK_3: skipped, AUTOBACKUP already found
channelORA_AUX_DISK_4: skipped, AUTOBACKUP already found
channelORA_AUX_DISK_1: copied control file copy
Finished restore at26-DEC-18
contents of MemoryScript:
{
   sql clone 'alter database mount standbydatabase';
}
executing MemoryScript
sql statement:alter database mount standby database
RMAN-05529:WARNING: DB_FILE_NAME_CONVERT resulted in invalid ASM names; names changed todisk group only.
contents of MemoryScript:
{
   set newname for tempfile  1 to
"+datafile";
   switch clone tempfile all;
   set newname for datafile  1 to
"/u01/app/oracle/oradata/orcl1/system.256.995732615";
   set newname for datafile  2 to
"/u01/app/oracle/oradata/orcl1/sysaux.257.995732615";
   set newname for datafile  3 to
"/u01/app/oracle/oradata/orcl1/undotbs1.258.995732615";
   set newname for datafile  4 to
"/u01/app/oracle/oradata/orcl1/users.259.995732615";
   set newname for datafile  5 to
"/u01/app/oracle/oradata/orcl1/undotbs2.264.995732765";
   backup as copy reuse
   datafile 1 auxiliary format
"/u01/app/oracle/oradata/orcl1/system.256.995732615"   datafile
2 auxiliary format
"/u01/app/oracle/oradata/orcl1/sysaux.257.995732615"   datafile
3 auxiliary format
"/u01/app/oracle/oradata/orcl1/undotbs1.258.995732615"   datafile
4 auxiliary format
"/u01/app/oracle/oradata/orcl1/users.259.995732615"   datafile
5 auxiliary format
"/u01/app/oracle/oradata/orcl1/undotbs2.264.995732765"   ;
   sql 'alter system archive log current';
}
executing MemoryScript
executing command:SET NEWNAME
renamed tempfile 1to +datafile in control file
executing command:SET NEWNAME
executing command:SET NEWNAME
executing command:SET NEWNAME
executing command:SET NEWNAME
executing command:SET NEWNAME
Starting backup at26-DEC-18
using channelORA_DISK_1
using channelORA_DISK_2
using channelORA_DISK_3
using channelORA_DISK_4
channel ORA_DISK_1:starting datafile copy
input datafile filenumber=00001 name=+DATAFILE/orcl/datafile/system.256.995732615
channel ORA_DISK_2:starting datafile copy
input datafile filenumber=00002 name=+DATAFILE/orcl/datafile/sysaux.257.995732615
channel ORA_DISK_3:starting datafile copy
input datafile filenumber=00003 name=+DATAFILE/orcl/datafile/undotbs1.258.995732615
channel ORA_DISK_4:starting datafile copy
input datafile filenumber=00005 name=+DATAFILE/orcl/datafile/undotbs2.264.995732765
output filename=/u01/app/oracle/oradata/orcl1/undotbs1.258.995732615tag=TAG20181226T141937
channel ORA_DISK_3:datafile copy complete, elapsed time: 00:00:07
channel ORA_DISK_3:starting datafile copy
input datafile filenumber=00004 name=+DATAFILE/orcl/datafile/users.259.995732615
output filename=/u01/app/oracle/oradata/orcl1/undotbs2.264.995732765tag=TAG20181226T141937
channel ORA_DISK_4:datafile copy complete, elapsed time: 00:00:33
output filename=/u01/app/oracle/oradata/orcl1/sysaux.257.995732615 tag=TAG20181226T141937
channel ORA_DISK_2:datafile copy complete, elapsed time: 00:00:40
output filename=/u01/app/oracle/oradata/orcl1/system.256.995732615 tag=TAG20181226T141937
channel ORA_DISK_1:datafile copy complete, elapsed time: 00:00:48
output filename=/u01/app/oracle/oradata/orcl1/users.259.995732615 tag=TAG20181226T141937
channel ORA_DISK_3:datafile copy complete, elapsed time: 00:00:18
Finished backup at26-DEC-18
sql statement: altersystem archive log current
contents of MemoryScript:
{
   switch clone datafile all;
}
executing MemoryScript
datafile 1 switchedto datafile copy
input datafile copyRECID=5 STAMP=995898027 filename=/u01/app/oracle/oradata/orcl1/system.256.995732615
datafile 2 switchedto datafile copy
input datafile copyRECID=6 STAMP=995898027 file name=/u01/app/oracle/oradata/orcl1/sysaux.257.995732615
datafile 3 switchedto datafile copy
input datafile copyRECID=7 STAMP=995898027 filename=/u01/app/oracle/oradata/orcl1/undotbs1.258.995732615
datafile 4 switchedto datafile copy
input datafile copyRECID=8 STAMP=995898027 file name=/u01/app/oracle/oradata/orcl1/users.259.995732615
datafile 5 switchedto datafile copy
input datafile copyRECID=9 STAMP=995898027 filename=/u01/app/oracle/oradata/orcl1/undotbs2.264.995732765
Finished Duplicate Db at 26-DEC-18

分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏 支持支持 反对反对
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|手机版|小黑屋|重庆思庄Oracle、Redhat认证学习论坛 ( 渝ICP备12004239号-4 )

GMT+8, 2024-11-27 08:38 , Processed in 0.134089 second(s), 21 queries .

重庆思庄学习中心论坛-重庆思庄科技有限公司论坛

© 2001-2020

快速回复 返回顶部 返回列表