Skip to Main Content

Database Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

RMAN-05520: database name mismatch, auxiliary instance has ORADB

007Mar 9 2013 — edited Mar 9 2013
Hi,

i am using Oracle 10g (10.2.0.1.0) in RHEL 5 server. i am trying to duplicate my primary database(ORADB) to standby database with name DEVDB in different server. I have taken an RMAN backup and transferred to standby server and now i am trying to duplicate with the below commands

[oracle@rhel5 data]$ rman target / auxiliary sys/oracle@DEVDB

Recovery Manager: Release 10.2.0.1.0 - Production on Sat Mar 9 16:11:52 2013

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

connected to target database: ORADB (DBID=2542358497, not open)
connected to auxiliary database: ORADB (not mounted)

RMAN>

RMAN>

RMAN> duplicate target database to DEVDB
2> ;

Starting Duplicate Db at 09-MAR-13
using target database control file instead of recovery catalog
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: sid=151 devtype=DISK
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of Duplicate Db command at 03/09/2013 16:14:02
RMAN-05520: database name mismatch, auxiliary instance has ORADB, command specified DEVDB


My primary db pfile has

*.db_name='ORADB'
*.db_unique_name='ORADB'

My standby db has

*.db_name='ORADB'
*.db_unique_name='DEVDB'

Regards,
007

Comments

mseberg
Hello;

Your duplicate command appears incorrect :
duplicate target database to DEVDB
Should be more like ( I have no more Oracle 10's to test )
duplicate target database for standby nofilenamecheck;
I have also seen this error caused by not restarting correctly after a failed duplicate. Meaning you have to shutdown the Standby, reset the ORACLE_SID and then reconnect to RMAN.

I'm pretty sure this will work on Oracle 10 :

http://www.visi.com/~mseberg/duprman.html

Best Regards

mseberg

Edited by: mseberg on Mar 9, 2013 5:21 AM
007
Hi mseberg ,

Thanks for your reply. In my RMAN command output it clearly shows the name of the auxiliary DB it has connected is ORADB its wrong. It should be DEVDB.

[oracle@rhel5 data]$ rman target / auxiliary sys/oracle@DEVDB

Recovery Manager: Release 10.2.0.1.0 - Production on Sat Mar 9 16:11:52 2013

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

connected to target database: ORADB (DBID=2542358497, not open)
connected to auxiliary database: ORADB (not mounted)

Regards,
007
mseberg
Hello again;

Agreed. You have at least two issues.

Generally I change the SID

export ORACLE_SID=DEVDB

Then I start NOMOUNT using an INIT file.

Then this should be correct
connected to target database: ORADB (DBID=2542358497, not open)
connected to auxiliary database: ORADB (not mounted)
h2. Later

I think I was wrong I would like to change my answer. I looked back and found my old notes and things are not as I stated above.

I used an INIT file ( standby side ) for cloning as follows :
db_name=RECOVER2
instance_name=RECOVER2
control_files=("/u01/app/oracle/oradata/RECOVER2/control01.ctl", "/u01/app/oracle/flash_recovery_area/RECOVER2/control02.ctl")
db_recovery_file_dest=/u01/app/oracle/flash_recovery_area
db_recovery_file_dest_size=4070572032
compatible=11.2.0.0.0
core_dump_dest='/u01/app/oracle/diag/rdbms/recover2/RECOVER2/cdump'
db_block_size=8192
audit_file_dest=/u01/app/oracle/admin/RECOVER2/adump
undo_tablespace=UNDOTBS1
undo_management = AUTO
undo_retention=10800
So for the duplicate I don't set DB_UNIQUE_NAME

I Backed up the target database as shown here with the ‘backup current controlfile for standby format’ command:
RMAN RUN {
allocate channel d1 type disk;
backup format '/u01/backups/RECOVER2/df_t%t_s%s_p%p' database;
sql 'alter system archive log current';
backup format '/u01/backups/RECOVER2/al_t%t_s%s_p%p' archivelog all;
backup current controlfile for standby format '/u01/backups/RECOVER2/sb_t%t_s%s_p%p';
release channel d1;
}
I did a startup the standby as follows : ( Notice you are correct about the SID and I was incorrect )
export ORACLE_SID=RECOVER2
/home/oracle:SRECOVER2 >sysplus "/ as sysdba" Connected to an idle instance. SQL> startup nomount pfile='/u01/app/oracle/admin/RECOVER2/pfile/initRECOVER2.ora';
I started RMAN like this :
/home/oracle:SRECOVER2 >export ORACLE_SID=RECOVER2

rman target sys/password@recover2 auxiliary /

Recovery Manager: Release 11.2.0.1.0 - Production on Fri Sep 10 13:35:29 2010

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

connected to target database: RECOVER2 (DBID=3806912436)
connected to auxiliary database: RECOVER2 (not mounted)
So you connect to the Primary, but the auxiliary should show "not mounted"

Finally I issue the duplicate command
RMAN> run {
2> allocate channel C1 device type disk;
3> allocate auxiliary channel C2 device type disk;
4> duplicate target database for standby nofilenamecheck;
5> }
Best Regards

mseberg

Edited by: mseberg on Mar 9, 2013 10:39 AM
1 - 3
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Apr 6 2013
Added on Mar 9 2013
3 comments
3,244 views