Home » RDBMS Server » Backup & Recovery » ORA-01504: database name 'MYDB' does not match parameter db_name 'ORCL' (11g R1 on Linux RHEL 5)
ORA-01504: database name 'MYDB' does not match parameter db_name 'ORCL' [message #518753] Sat, 06 August 2011 02:51 Go to next message
farnaw4u
Messages: 22
Registered: October 2006
Location: pakistan
Junior Member
I am creating a duplicate database usung rman,so for everything
went fine but error "ORA-01504" , my pfile seems ok ..

kindly find below ........ and help me to solve this error..


[oracle@lnxdb ~]$ $ORACLE_HOME/bin/rman target sys/sys@orcl

Recovery Manager: Release 11.1.0.6.0 - Production on Sat Aug 6 17:29:37 2011

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

connected to target database: ORCL (DBID=1285998855)

RMAN> connect auxiliary sys/sys@mydb

connected to auxiliary database: MYDB (not mounted)

RMAN> duplicate target database to mydb;

Starting Duplicate Db at 06-AUG-11
using target database control file instead of recovery catalog
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: SID=152 device type=DISK

contents of Memory Script:
{
set until scn 668103;
set newname for datafile 1 to
"/u01/app/oracle/oradata/mydb/system01.dbf";
set newname for datafile 2 to
"/u01/app/oracle/oradata/mydb/sysaux01.dbf";
set newname for datafile 3 to
"/u01/app/oracle/oradata/mydb/undotbs01.dbf";
set newname for datafile 4 to
"/u01/app/oracle/oradata/mydb/users01.dbf";
set newname for datafile 5 to
"/u01/app/oracle/oradata/mydb/example01.dbf";
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

Starting restore at 06-AUG-11
using channel ORA_AUX_DISK_1

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 /u01/app/oracle/oradata/mydb/system01.dbf
channel ORA_AUX_DISK_1: restoring datafile 00002 to /u01/app/oracle/oradata/mydb/sysaux01.dbf
channel ORA_AUX_DISK_1: restoring datafile 00003 to /u01/app/oracle/oradata/mydb/undotbs01.dbf
channel ORA_AUX_DISK_1: restoring datafile 00004 to /u01/app/oracle/oradata/mydb/users01.dbf
channel ORA_AUX_DISK_1: restoring datafile 00005 to /u01/app/oracle/oradata/mydb/example01.dbf
channel ORA_AUX_DISK_1: reading from backup piece /u01/app/oracle/flash_recovery_area/ORCL/backupset/2011_08_05/o1_mf_nnndf_TAG20110805T162013_73qnhgm0_.bkp
channel ORA_AUX_DISK_1: piece handle=/u01/app/oracle/flash_recovery_area/ORCL/backupset/2011_08_05/o1_mf_nnndf_TAG20110805T162013_73qnhgm0_.bkp tag=TAG20110805T162013
channel ORA_AUX_DISK_1: restored backup piece 1
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:01:14
Finished restore at 06-AUG-11
sql statement: CREATE CONTROLFILE REUSE SET DATABASE "MYDB" RESETLOGS ARCHIVELOG
MAXLOGFILES 16
MAXLOGMEMBERS 3
MAXDATAFILES 100
MAXINSTANCES 8
MAXLOGHISTORY 292
LOGFILE
GROUP 1 ( '/u01/app/oracle/oradata/mydb/redo01.log' ) SIZE 50 M REUSE,
GROUP 2 ( '/u01/app/oracle/oradata/mydb/redo02.log' ) SIZE 50 M REUSE,
GROUP 3 ( '/u01/app/oracle/oradata/mydb/redo03.log' ) SIZE 50 M REUSE
DATAFILE
'/u01/app/oracle/oradata/mydb/system01.dbf'
CHARACTER SET WE8MSWIN1252


contents of Memory Script:
{
switch clone datafile all;
}
executing Memory Script

datafile 2 switched to datafile copy
input datafile copy RECID=1 STAMP=758482396 file name=/u01/app/oracle/oradata/mydb/sysaux01.dbf
datafile 3 switched to datafile copy
input datafile copy RECID=2 STAMP=758482396 file name=/u01/app/oracle/oradata/mydb/undotbs01.dbf
datafile 4 switched to datafile copy
input datafile copy RECID=3 STAMP=758482396 file name=/u01/app/oracle/oradata/mydb/users01.dbf
datafile 5 switched to datafile copy
input datafile copy RECID=4 STAMP=758482396 file name=/u01/app/oracle/oradata/mydb/example01.dbf

contents of Memory Script:
{
set until scn 668103;
recover
clone database
delete archivelog
;
}
executing Memory Script

executing command: SET until clause

Starting recover at 06-AUG-11
using channel ORA_AUX_DISK_1

starting media recovery

archived log for thread 1 with sequence 10 is already on disk as file /u01/app/oracle/flash_recovery_area/ORCL/archivelog/2011_08_05/o1_mf_1_10_73qnlhm3_.arc
archived log for thread 1 with sequence 11 is already on disk as file /u01/app/oracle/flash_recovery_area/ORCL/archivelog/2011_08_06/o1_mf_1_11_73t8dc3l_.arc
archived log file name=/u01/app/oracle/flash_recovery_area/ORCL/archivelog/2011_08_05/o1_mf_1_10_73qnlhm3_.arc thread=1 sequence=10
archived log file name=/u01/app/oracle/flash_recovery_area/ORCL/archivelog/2011_08_06/o1_mf_1_11_73t8dc3l_.arc thread=1 sequence=11
media recovery complete, elapsed time: 00:00:20
Finished recover at 06-AUG-11

contents of Memory Script:
{
shutdown clone immediate;
startup clone nomount ;
}
executing Memory Script

database dismounted
Oracle instance shut down

connected to auxiliary database (not started)
startup failed: ORA-01078: failure in processing system parameters
LRM-00109: could not open parameter file '/u01/app/oracle/product/11.1.0/db_1/dbs/initMYDB.ora'

starting Oracle instance without parameter file for retrieval of spfile
Oracle instance started

Total System Global Area 159019008 bytes

Fixed Size 1298584 bytes
Variable Size 67112808 bytes
Database Buffers 83886080 bytes
Redo Buffers 6721536 bytes
sql statement: CREATE CONTROLFILE REUSE SET DATABASE "MYDB" RESETLOGS ARCHIVELOG
MAXLOGFILES 16
MAXLOGMEMBERS 3
MAXDATAFILES 100
MAXINSTANCES 8
MAXLOGHISTORY 292
LOGFILE
GROUP 1 ( '/u01/app/oracle/oradata/mydb/redo01.log' ) SIZE 50 M REUSE,
GROUP 2 ( '/u01/app/oracle/oradata/mydb/redo02.log' ) SIZE 50 M REUSE,
GROUP 3 ( '/u01/app/oracle/oradata/mydb/redo03.log' ) SIZE 50 M REUSE
DATAFILE
'/u01/app/oracle/oradata/mydb/system01.dbf'
CHARACTER SET WE8MSWIN1252

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of Duplicate Db command at 08/06/2011 17:33:53
RMAN-06136: ORACLE error from auxiliary database: ORA-01503: CREATE CONTROLFILE failed
ORA-01504: database name 'MYDB' does not match parameter db_name 'ORCL'

RMAN>

===========================================

My alert log log is

mydb.__db_cache_size=146800640
mydb.__java_pool_size=12582912
mydb.__large_pool_size=4194304
mydb.__oracle_base='/u01/app/oracle'#ORACLE_BASE set from environment
mydb.__pga_aggregate_target=117440512
mydb.__sga_target=297795584
mydb.__shared_io_pool_size=0
mydb.__shared_pool_size=125829120
mydb.__streams_pool_size=0
*.audit_file_dest='/u01/app/oracle/admin/mydb/adump'
*.audit_trail='db'
*.compatible='11.1.0.0.0'
*.control_files='/u01/app/oracle/oradata/mydb/control01.ctl','/u01/app/oracle/oradata/mydb/control02.ctl','/u01/app/oracle/oradata/my db/control03.ctl'
*.db_block_size=8192
*.db_domain=''
*.db_name='mydb'
*.db_recovery_file_dest='/u01/app/oracle/flash_recovery_area'
*.db_recovery_file_dest_size=2147483648
*.diagnostic_dest='/u01/app/oracle'
*.dispatchers='(PROTOCOL=TCP) (SERVICE=mydbXDB)'
*.memory_target=412090368
*.open_cursors=300
*.processes=150
*.remote_login_passwordfile='EXCLUSIVE'
*.undo_tablespace='UNDOTBS1'


*.db_file_name_convert='/u01/app/oracle/oradata/orcl','/u01/app/oracle/oradata/mydb'

*.log_file_name_convert='/u01/app/oracle/oradata/orcl','/u01/app/oracle/oradata/mydb'

=====

Thnaks for advance

Re: ORA-01504: database name 'MYDB' does not match parameter db_name 'ORCL' [message #518789 is a reply to message #518753] Sat, 06 August 2011 17:58 Go to previous messageGo to next message
Mahesh Rajendran
Messages: 10708
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
try something like this.
DUPLICATE TARGET DATABASE TO dupdb
# specify client-side parameter file (on same host as RMAN executable) for auxiliary instance 
PFILE = /dup/oracle/dbs/initDUPDB.ora


just specify your init<sid>.ora pfile manually.
Re: ORA-01504: database name 'MYDB' does not match parameter db_name 'ORCL' [message #518851 is a reply to message #518753] Mon, 08 August 2011 02:12 Go to previous messageGo to next message
dkdms2124
Messages: 369
Registered: April 2010
Location: INDIA
Senior Member

Just like Mahesh said: "You have to specify the pfile in your RMAN duplicate command."

Check out this Example:

RMAN> connect target sys/oracle@orcl
connected to target database: ORCL (DBID=xxxxxxxxxxxx)

RMAN> connect auxiliary sys/oracle@test
connected to auxiliary database: TEST (not mounted)

RMAN> run
2> {
3> allocate auxiliary channel c1 device type disk;
4> allocate auxiliary channel c2 device type disk;
5> duplicate target database to "TEST"
6> pfile='F:\app\dsharma\product\11.2.0\dbhome_1\database\inittest.ora';
7> }


Thanks
Deepak
Re: ORA-01504: database name 'MYDB' does not match parameter db_name 'ORCL' [message #519023 is a reply to message #518851] Mon, 08 August 2011 23:28 Go to previous message
farnaw4u
Messages: 22
Registered: October 2006
Location: pakistan
Junior Member

Thanks Mahesh and Deepak ,

I specified Pfile and It 's Done......

Thanks once Again ..
Previous Topic: RMAN trying to read from wrong backup?
Next Topic: Restore Backup
Goto Forum:
  


Current Time: Sun Nov 24 08:17:26 CST 2024