ORA-01103 - During Creation/DUPLICATE on Physical Standby
Trying to setup a Data Guard configuration, but can't successfully create the standby database. It is failing on the DUPLICATE command
Oracle 10.1.0.5
Red Hat 3
Primary DB = PRIMARY
Standby = ADSUB
PRIMARY init
*.db_name='PRIMARY'
*.db_unique_name='PRIMARY'
*.LOG_ARCHIVE_CONFIG='DG_CONFIG=(PRIMARY,ADSUB)'
*.LOG_ARCHIVE_DEST_1='LOCATION=/data/flash_recovery_area/PRIMARY/archivelog VALID_FOR=(ALL_LOGFILES,ALL_ROLES) DB_UNIQUE_NAME=PRIMARY'
*.LOG_ARCHIVE_DEST_2='SERVICE=ADSUB ASYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=ADSUB'
*.LOG_ARCHIVE_DEST_STATE_1='ENABLE'
*.LOG_ARCHIVE_DEST_STATE_2='ENABLE'
*.LOG_ARCHIVE_FORMAT='%t_%s_%r.arc
Standby init
*.DB_NAME=ADSUB
*.compatible=10.1.0.2.0
*.remote_login_passwordfile='EXCLUSIVE'
*.db_file_name_convert='/data/oradata/PRIMARY/',
'/data/oradata/ADSUB/'
*.log_file_name_convert='/data/flash_recovery_area/PRIMARY/archivelog/',
'/data/flash_recovery_area/ADSUB/archivelog/',
'/data/oradata/PRIMARY/',
'/data/oradata/ADSUB/'
*.fal_client=ADSUB
*.fal_server=PRIMARY
*.standby_file_management=AUTO
*.log_archive_config='dg_config=(PRIMARY,ADSUB)'
l*.og_archive_dest_1='service=PRIMARY ASYNC
valid_for=(ONLINE_LOGFILE,PRIMARY_ROLE) db_unique_name=PRIMARY'
*.control_files='/opt/oracle/app/oracle/product/10g/db_1/dbs/ADSUB.ctl',
'/tmp/ADSUB.ctl'
Steps
1) Made RMAN backup of PRIMARY
run {
allocate channel c1 device type disk;
backup database plus archivelog;
INCLUDE CURRENT CONTROLFILE FOR STANDBY;
}
2) Made standby control from PRIMARY
alter database create standby controlfile as '/tmp/ADSUB.ctl';
3) Moved standby control file to standby site
/tmp/ADSUB.ctl
/opt/oracle/app/oracle/product/10g/db_1/dbs/ADSUB.ctl
4) Issed the following to duplicate
rman
connect target /
connect auxiliary sys/<pass>@ADSUB
RMAN> run{
allocate channel c1 type disk;
allocate channel c2 type disk;
allocate channel c3 type disk;
allocate channel c4 type disk;
allocate auxiliary channel stby type disk;
duplicate target database for standby;
release channel c1
}
Starting Duplicate Db at 23-JUL-08
contents of Memory Script:
{
restore clone standby controlfile;
sql clone 'alter database mount standby database';
}
executing Memory Script
Starting restore at 23-JUL-08
channel stdby: restoring controlfile
channel stdby: copied controlfile copy
input filename=/tmp/ADSUB.ctl
output filename=/opt/oracle/app/oracle/product/10g/db_1/dbs/cntrlADSUB.dbf
Finished restore at 23-JUL-08
sql statement: alter database mount standby database
released channel: c1
released channel: c2
released channel: c3
released channel: c4
released channel: stdby
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of Duplicate Db command at 07/23/2008 12:34:01
RMAN-03015: error occurred in stored script Memory Script
RMAN-03009: failure of sql command on clone_default channel at 07/23/2008 12:34:01
RMAN-11003: failure during parse/execution of SQL statement: alter database mount standby database
ORA-01103: database name 'PRIMARY' in controlfile is not 'ADSUB'
Any help is greatly appreciated... What am I doing wrong???
Thanks!