這個錯誤的緣由是鏈接方式的錯誤sql
最初採用數據庫
[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
[oracle@host ~]$ rman target sys/oracle@BOLO102std auxiliary sys/oracle@BOLO102
此時又有一個問題code
[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文件了,關閉數據庫從新鏈接ip
[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中添加如下代碼get
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) ) )
修改後從新鏈接it
[oracle@host ~]$ rman target sys/oracle@BOLO102std auxiliary sys/oracle@BOLO102