$ rman target sys/oracle@anyang auxiliary sys/oracle@dup
Recovery Manager: Release 12.1.0.2.0 - Production on Mon Aug 29 12:03:42 2016
Copyright (c) 1982, 2014, Oracle and/or its affiliates. All rights reserved.
connected to target database: ANYANG (DBID=370809280)
connected to auxiliary database: ANYANG (not mounted)
RMAN> duplicate target database for standby from active database;
Starting Duplicate Db at 29-AUG-16
using target database control file instead of recovery catalog
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: SID=393 instance=anyangs1 device type=DISK
contents of Memory Script:
{
backup as copy reuse
targetfile '+DATA/ANYANG/PASSWORD/pwdanyang.256.921091921' auxiliary format
'/extmp/app/oracle/product/12.1.0/dbhome_1/dbs/orapwanyangs1' ;
}
executing Memory Script
Starting backup at 29-AUG-16
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=3 instance=anyang1 device type=DISK
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of Duplicate Db command at 08/29/2016 12:03:58
RMAN-05501: aborting duplication of target database
RMAN-03015: error occurred in stored script Memory Script
RMAN-03009: failure of backup command on ORA_DISK_1 channel at 08/29/2016 12:03:58
ORA-17629: Cannot connect to the remote database server
ORA-17627: ORA-12154: TNS:could not resolve the connect identifier specified
ORA-17629: Cannot connect to the remote database server
Recovery Manager: Release 12.1.0.2.0 - Production on Mon Aug 29 12:03:42 2016
Copyright (c) 1982, 2014, Oracle and/or its affiliates. All rights reserved.
connected to target database: ANYANG (DBID=370809280)
connected to auxiliary database: ANYANG (not mounted)
RMAN> duplicate target database for standby from active database;
Starting Duplicate Db at 29-AUG-16
using target database control file instead of recovery catalog
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: SID=393 instance=anyangs1 device type=DISK
contents of Memory Script:
{
backup as copy reuse
targetfile '+DATA/ANYANG/PASSWORD/pwdanyang.256.921091921' auxiliary format
'/extmp/app/oracle/product/12.1.0/dbhome_1/dbs/orapwanyangs1' ;
}
executing Memory Script
Starting backup at 29-AUG-16
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=3 instance=anyang1 device type=DISK
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of Duplicate Db command at 08/29/2016 12:03:58
RMAN-05501: aborting duplication of target database
RMAN-03015: error occurred in stored script Memory Script
RMAN-03009: failure of backup command on ORA_DISK_1 channel at 08/29/2016 12:03:58
ORA-17629: Cannot connect to the remote database server
ORA-17627: ORA-12154: TNS:could not resolve the connect identifier specified
ORA-17629: Cannot connect to the remote database server
RMAN>
原因有以下几种:
1.主机和备机端的所有节点都需要配置tnsnames.ora
2.将DB的ORACLE_HOME中的tnsnames.ora拷贝到GRID的ORACLE_HOME中
注:dup也可以使用使用描述字符串取代,如:(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=10.224.28.125)(PORT=1525))(CONNECT_DATA=(SERVER=DEDICATED)(SID=anyangs1))),“=”两边不要有空格。