1. 程式人生 > >RMAN-05537: DUPLICATE without TARGET connection when auxiliary instance is started with spfile canno

RMAN-05537: DUPLICATE without TARGET connection when auxiliary instance is started with spfile canno

ech class sed 步驟 size 問題處理 and ase style

今天是2014-06-18。在復制數據的時候出現例如以下錯誤:

RMAN-05537: DUPLICATE without TARGET connection when auxiliary instance is started with spfile cannot use SPFILE clause

操作步驟例如以下:

[[email protected] dbs]$ rman target [email protected] auxiliary [email protected]

Recovery Manager: Release 11.2.0.4.0 - Production on Wed Jun 18 13:24:33 2014

Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.

connected to target database: RHYS (DBID=2760870303)
connected to auxiliary database: DG2 (not mounted)

RMAN> 

RMAN> 

RMAN> 

RMAN> 

RMAN> run{
2>  allocate channel ch1 type disk;
3>  allocate channel ch2 type disk;
4>  allocate channel ch3 type disk;
5>  allocate channel ch4 type disk;
6>  allocate channel ch5 type disk;
7>  allocate channel ch6 type disk;
8>  allocate channel ch7 type disk;
9>  allocate auxiliary channel ch8 type disk;
10>  duplicate target database for standby from active database nofilenamecheck
11>  spfile
12>    parameter_value_convert ‘dg1‘,‘dg2‘
13>    set db_unique_name=‘dg2‘
14>    set db_recovery_file_dest=‘/u01/app/oracle/fast_recovery_area‘
15>    set DB_RECOVERY_FILE_DEST_SIZE=‘4G‘
16>    set control_files=‘/u01/app/oracle/oradata/dg/control01.ctl‘
17>    set db_create_file_dest=‘/u01/app/oracle/oradata/dg‘
18>    set db_create_online_log_dest_1=‘/u01/app/oracle/oradata/dg‘
19>    set log_archive_max_processes=‘5‘
20>    set fal_client=‘dg2‘
21>    set fal_server=‘dg1‘
22>    set standby_file_management=‘AUTO‘
23>    set log_archive_config=‘dg_config=(dg1,dg2)‘
24>    set log_archive_dest_1=‘location=USE_DB_RECOVERY_FILE_DEST valid_for=(all_logfiles,all_roles)‘
25>    set log_archive_dest_2=‘service=dg1 lgwr sync valid_for=(online_logfiles,primary_role) db_unique_name=dg1‘;
26>     sql channel ch6 "alter system set log_archive_max_processes=5";
27>     sql channel ch7 "alter system set fal_client=dg1";
28>     sql channel ch7 "alter system set fal_server=dg2";
29>     sql channel ch5 "alter system set standby_file_management=AUTO";
30>     sql channel ch6 "alter system set log_archive_config=‘‘dg_config=(dg1,dg2)‘‘";
31>     sql channel ch7 "alter system set log_archive_dest_2=‘‘service=dg2 lgwr sync valid_for=(online_logfiles,primary_role) db_unique_name=dg2‘‘";
32>     sql channel ch6 "alter system set log_archive_dest_1=‘‘location=USE_DB_RECOVERY_FILE_DEST valid_for=(all_logfiles,all_roles)‘‘";
33>     sql channel ch1 "alter system archive log current";
34>     sql channel ch8 "alter database recover managed standby database using current logfile disconnect from session";
35>  release channel ch1;
36>  release channel ch2;
37>  release channel ch3;
38>  release channel ch4;
39>  release channel ch5;
40>  release channel ch6;
41>  release channel ch7;
42>  release channel ch8;
43> }

using target database control file instead of recovery catalog
allocated channel: ch1
channel ch1: SID=35 device type=DISK

allocated channel: ch2
channel ch2: SID=42 device type=DISK

allocated channel: ch3
channel ch3: SID=44 device type=DISK

allocated channel: ch4
channel ch4: SID=38 device type=DISK

allocated channel: ch5
channel ch5: SID=36 device type=DISK

allocated channel: ch6
channel ch6: SID=41 device type=DISK

allocated channel: ch7
channel ch7: SID=37 device type=DISK

allocated channel: ch8
channel ch8: SID=1 device type=DISK

Starting Duplicate Db at 18-JUN-14
released channel: ch1
released channel: ch2
released channel: ch3
released channel: ch4
released channel: ch5
released channel: ch6
released channel: ch7
released channel: ch8
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of Duplicate Db command at 06/18/2014 13:24:43
RMAN-05501: aborting duplication of target database
RMAN-05537: DUPLICATE without TARGET connection when auxiliary instance is started with spfile cannot use SPFILE clause

RMAN> exit


問題處理。

將備庫創建pfile文件,然後從pfile啟動就可以。

[[email protected] dbs]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.4.0 Production on Wed Jun 18 13:25:03 2014

Copyright (c) 1982, 2013, Oracle.  All rights reserved.


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> shutdown immediate;
ORA-01507: database not mounted


ORACLE instance shut down.
SQL> 
SQL> create pfile=‘/home/oracle/pfile.ora‘ from spfile;

File created.

SQL> startup nomount pfile=‘/home/oracle/pfile.ora‘;
ORACLE instance started.

Total System Global Area  839282688 bytes
Fixed Size                  2257880 bytes
Variable Size             545262632 bytes
Database Buffers          289406976 bytes
Redo Buffers                2355200 bytes
SQL> 
SQL> 


RMAN-05537: DUPLICATE without TARGET connection when auxiliary instance is started with spfile canno