这个错误的原因是连接方式的错误
最初采用
[oracle@host ~]$ rman target sys/oracle@BOLO102std auxiliary /
Recovery Manager: Release 11.2.0.3.0 - Production on Fri Aug 23 15:25:53 2013
Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
connected to target database: BOLO102 (DBID=3869602045)
connected to auxiliary database: BOLO102 (DBID=3869602045, not open)
run{
DUPLICATE TARGET DATABASE
FOR STANDBY
FROM ACTIVE DATABASE
DORECOVER
SPFILE
SET db_unique_name='BOLO102'
SET log_archive_config='dg_config=(BOLO102,BOLO102std)'
SET log_file_name_convert= '/opt/oracle/oradata/BOLO102','/opt/oracle/oradata/BOLO102std'
NOFILENAMECHECK; }
Starting Duplicate Db at 23-AUG-13
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of Duplicate Db command at 08/23/2013 15:26:40
RMAN-05501: aborting duplication of target database
RMAN-06217: not connected to auxiliary database with a net service name
解决办法
[oracle@host ~]$ rman target sys/oracle@BOLO102std auxiliary sys/oracle@BOLO102
此时又有一个问题
[oracle@host ~]$ rman target sys/oracle@BOLO102std auxiliary sys/oracle@BOLO102
Starting Duplicate Db at 23-AUG-13
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of Duplicate Db command at 08/23/2013 15:28:17
RMAN-05501: aborting duplication of target database
RMAN-05537: DUPLICATE without TARGET connection when auxiliary instance is started with spfile cannot use SPFILE clause
原来数据库现在是mount状态,已经使用了spfile文件了,关闭数据库重新连接
[oracle@host ~]$ rman target sys/oracle@BOLO102std auxiliary sys/oracle@BOLO102
Recovery Manager: Release 11.2.0.3.0 - Production on Fri Aug 23 16:23:25 2013
Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00554: initialization of internal recovery manager package failed
RMAN-04005: error from target database:
ORA-12514: TNS:listener does not currently know of service requested in connect descriptor
auxiliary数据库连接方式必须使用静态注册的方式只好在listener.ora中添加以下代码
SID_LIST_LISTENER=
(SID_LIST=
(SID_DESC=
(SID_NAME=BOLO102)
(SDU=32767)
(ORACLE_HOME=/opt/oracle/product/11.2.0/dbhome_1)
)
并求修改tnsnames.ora替换SID
BOLO102 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.130.100)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
# (SERVICE_NAME = BOLO102.com)
(sid=BOLO102)
)
)
BOLO102std =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.130.171)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
# (SERVICE_NAME = BOLO102std.com)
(sid=BOLO102std)
)
)
修改后重新连接
[oracle@host ~]$ rman target sys/oracle@BOLO102std auxiliary sys/oracle@BOLO102