
最近搭建了一套Oracle 11.2.0.4单机的DataGuard,
使用duplicate target database 命令时遇到一个错误,见下:
RMAN> duplicate target database for standby nofilenamecheck;
Starting Duplicate Db at 18-JUN-25
using target database control file instead of recovery catalog
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: SID=1249 device type=DISK
contents of Memory Script:
{
restore clone standby controlfile;
}
executing Memory Script
Starting restore at 18-JUN-25
using channel ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: restoring control file
channel ORA_AUX_DISK_1: reading from backup piece /home/ora11204/backup/STD_033saqo1_1_1
channel ORA_AUX_DISK_1: piece handle=/home/ora11204/backup/STD_033saqo1_1_1 tag=TAG20250618T134046
channel ORA_AUX_DISK_1: restored backup piece 1
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:01
output file name=/home/ora11204/app/oracle/oradata/std/control01.ctl
output file name=/home/ora11204/app/oracle/fast_recovery_area/std/control02.ctl
Finished restore at 18-JUN-25
contents of Memory Script:
{
sql clone 'alter database mount standby database';
}
executing Memory Script
sql statement: alter database mount standby database
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of Duplicate Db command at 06/18/2025 13:57:21
RMAN-05501: aborting duplication of target database
RMAN-03015: error occurred in stored script Memory Script
RMAN-03009: failure of sql command on clone_default channel at 06/18/2025 13:57:21
RMAN-11003: failure during parse/execution of SQL statement: alter database mount standby database
ORA-01103: database name 'ORCL' in control file is not 'STD'
RMAN> exit后来分析了一下,是DataGuard备库的参数文件的问题:
*.db_name='orcl',写成了*.db_name='std'
db_name有如下含义:
DB_NAME is a name that uniquely identified a database in a server,
It's defined at the time of database creation and written into control files.
One can't have two databases with the same DB name on the same server even in two different homes.