发表于: 2008.10.02 21:48
分类: ORACLE , Bug
出处: http://yangtingkun.itpub.net/post/468/471660
---------------------------------------------------------------
尝试对RAC环境执行DUPLICATE操作报错。
执行的命令和错误信息为:
bash-3.00$ rman target sys/test@172.0.2.54/rac11g.us.oracle.com catalog catalog_user/catalog_user@172.0.2.61/test11g.netdb auxiliary /
Recovery Manager: Release 11.1.0.6.0 - Production on Mon Sep 8 18:48:31 2008
Copyright (c) 1982, 2007, Oracle. All rights reserved.
connected to target database: RAC11G (DBID=1712482917)
connected to recovery catalog database
connected to auxiliary database: RAC11GS (not mounted)
RMAN> duplicate target database to rac11gs
2> db_file_name_convert '/dev/vx/rdsk/datavg', '+DATA/RAC11G'
3> spfile
4> parameter_value_convert '/dev/vx/rdsk/datavg', '+DATA/RAC11G'
5> set log_file_name_convert '/dev/vx/rdsk/datavg', '+DATA/RAC11G'
6> set log_archive_dest_1='LOCATION=+DATA/RAC11G'
7> set local_listener = ''
8> ;
Starting Duplicate Db at 08-SEP-08
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: SID=54 device type=DISK
contents of Memory Script:
{
set until scn 26685490;
restore clone spfile to '/data/oracle/product/11.1/database/dbs/spfilerac11g1.ora';
sql clone "alter system set spfile= ''/data/oracle/product/11.1/database/dbs/spfilerac11g1.ora''";
}
executing Memory Script
executing command: SET until clause
Starting restore at 08-SEP-08
using channel ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: restoring SPFILE
output file name=/data/oracle/product/11.1/database/dbs/spfilerac11g1.ora
channel ORA_AUX_DISK_1: reading from backup piece +DATA/backup/01jpk0bj_1_1
channel ORA_AUX_DISK_1: piece handle=+DATA/backup/01jpk0bj_1_1 tag=TAG20080902T204539
channel ORA_AUX_DISK_1: restored backup piece 1
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:07
Finished restore at 08-SEP-08
sql statement: alter system set spfile= ''/data/oracle/product/11.1/database/dbs/spfilerac11g1.ora''
contents of Memory Script:
{
sql clone "alter system set db_name =
''RAC11GS'' comment=
''duplicate'' scope=spfile";
sql clone "alter system set control_files =
''+DATA/RAC11G/rac11g_control_1'', ''+DATA/RAC11G/rac11g_control_2'', ''+DATA/RAC11G/rac11g_control_3'' comment=
'''' scope=spfile";
sql clone "alter system set log_file_name_convert =
''/dev/vx/rdsk/datavg'', ''+DATA/RAC11G'' comment=
'''' scope=spfile";
sql clone "alter system set log_archive_dest_1 =
''LOCATION=+DATA/RAC11G'' comment=
'''' scope=spfile";
sql clone "alter system set local_listener =
'''' comment=
'''' scope=spfile";
shutdown clone immediate;
startup clone nomount ;
}
executing Memory Script
sql statement: alter system set db_name = ''RAC11GS'' comment= ''duplicate'' scope=spfile
sql statement: alter system set control_files = ''+DATA/RAC11G/rac11g_control_1'', ''+DATA/RAC11G/rac11g_control_2'', ''+DATA/RAC11G/rac11g_control_3'' comment= '''' scope=spfile
sql statement: alter system set log_file_name_convert = ''/dev/vx/rdsk/datavg'', ''+DATA/RAC11G'' comment= '''' scope=spfile
sql statement: alter system set log_archive_dest_1 = ''LOCATION=+DATA/RAC11G'' comment= '''' scope=spfile
sql statement: alter system set local_listener = '''' comment= '''' scope=spfile
Oracle instance shut down
connected to auxiliary database (not started)
Oracle instance started
Total System Global Area 17108271104 bytes
Fixed Size 2101632 bytes
Variable Size 3747073664 bytes
Database Buffers 13354663936 bytes
Redo Buffers 4431872 bytes
contents of Memory Script:
{
set until scn 26685490;
set newname for datafile 1 to
"+DATA/rac11g/rac11g_system_1_1g";
set newname for datafile 2 to
"+DATA/rac11g/rac11g_sysaux_1_1g";
set newname for datafile 3 to
"+DATA/rac11g/rac11g_undotbs1_1_4g";
set newname for datafile 4 to
"+DATA/rac11g/rac11g_undotbs2_1_4g";
set newname for datafile 5 to
"+DATA/rac11g/rac11g_users_1_4g";
set newname for datafile 6 to
"+DATA/rac11g/rac11g_ndmain_1_32g";
set newname for datafile 7 to
"+DATA/rac11g/rac11g_ndmain_2_32g";
set newname for datafile 8 to
"+DATA/rac11g/rac11g_ndmain_3_32g";
set newname for datafile 9 to
"+DATA/rac11g/rac11g_ndmain_4_32g";
set newname for datafile 10 to
"+DATA/rac11g/rac11g_ndmain_5_32g";
set newname for datafile 11 to
"+DATA/rac11g/rac11g_ndmain_6_32g";
set newname for datafile 12 to
"+DATA/rac11g/rac11g_undotbs1_2_32g";
set newname for datafile 13 to
"+DATA/rac11g/rac11g_undotbs2_2_32g";
set newname for datafile 14 to
"+DATA/rac11g/rac11g_perfstat_1_8g";
restore
clone database
;
}
executing Memory Script
executing command: SET until clause
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
Starting restore at 08-SEP-08
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: SID=660 instance=rac11g1 device type=DISK
channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_AUX_DISK_1: restoring datafile 00001 to +DATA/rac11g/rac11g_system_1_1g
channel ORA_AUX_DISK_1: restoring datafile 00002 to +DATA/rac11g/rac11g_sysaux_1_1g
channel ORA_AUX_DISK_1: restoring datafile 00003 to +DATA/rac11g/rac11g_undotbs1_1_4g
channel ORA_AUX_DISK_1: restoring datafile 00004 to +DATA/rac11g/rac11g_undotbs2_1_4g
channel ORA_AUX_DISK_1: restoring datafile 00005 to +DATA/rac11g/rac11g_users_1_4g
channel ORA_AUX_DISK_1: restoring datafile 00006 to +DATA/rac11g/rac11g_ndmain_1_32g
channel ORA_AUX_DISK_1: restoring datafile 00007 to +DATA/rac11g/rac11g_ndmain_2_32g
channel ORA_AUX_DISK_1: restoring datafile 00008 to +DATA/rac11g/rac11g_ndmain_3_32g
channel ORA_AUX_DISK_1: restoring datafile 00009 to +DATA/rac11g/rac11g_ndmain_4_32g
channel ORA_AUX_DISK_1: restoring datafile 00010 to +DATA/rac11g/rac11g_ndmain_5_32g
channel ORA_AUX_DISK_1: restoring datafile 00011 to +DATA/rac11g/rac11g_ndmain_6_32g
channel ORA_AUX_DISK_1: restoring datafile 00012 to +DATA/rac11g/rac11g_undotbs1_2_32g
channel ORA_AUX_DISK_1: restoring datafile 00013 to +DATA/rac11g/rac11g_undotbs2_2_32g
channel ORA_AUX_DISK_1: restoring datafile 00014 to +DATA/rac11g/rac11g_perfstat_1_8g
channel ORA_AUX_DISK_1: reading from backup piece +DATA/backup/01jpk0bj_1_1
channel ORA_AUX_DISK_1: piece handle=+DATA/backup/01jpk0bj_1_1 tag=TAG20080902T204539
channel ORA_AUX_DISK_1: restored backup piece 1
channel ORA_AUX_DISK_1: restore complete, elapsed time: 01:02:59
Finished restore at 08-SEP-08
sql statement: CREATE CONTROLFILE REUSE SET DATABASE "RAC11GS" RESETLOGS ARCHIVELOG
MAXLOGFILES 192
MAXLOGMEMBERS 3
MAXDATAFILES 1024
MAXINSTANCES 32
MAXLOGHISTORY 1168
LOGFILE
GROUP 1 ( '+DATA/rac11g/rac11g_redo1_1_1_1g' ) SIZE 1 G REUSE,
GROUP 2 ( '+DATA/rac11g/rac11g_redo1_2_1_1g' ) SIZE 1 G REUSE
DATAFILE
'+DATA/rac11g/rac11g_system_1_1g'
CHARACTER SET ZHS16GBK
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of Duplicate Db command at 09/08/2008 19:52:27
RMAN-06136: ORACLE error from auxiliary database: ORA-01503: CREATE CONTROLFILE failed
ORA-12720: operation requires database is in EXCLUSIVE mode
检查metalink,发现Oracle的RAC环境执行DUPLICATE操作的时候,必须将CLUSTER_DATABASE参数设置为FALSE,否则就会导致这个错误的产生,详细描述可以参考:Doc ID: Note:341089.1。
在DUPLICATE命令后面添加SET cluster database = ‘false’后重新执行duplicate命令,错误解决。











