RE: RMAN clone with ASM



If I recall correctly, this depends on the setting of the db_unique_name
initialization parameter of the restored db. Set that to PSPLAY (or another
as appropriate) before the restore. I remember only setting newname to just
the disk group and not the full path. Example:


Set newname for datafile 1 to '+SYSTEM' ;


I am not experienced with the rman cloning but rather using rman to
replicate (without using duplicate/clone). In my case the db_name had to
match the source since the controlfile was from the source db and that was
also the way rman found the correct database (without using the set dbid


It appears that the restore in the example you show below happened because
of the db_create_file_dest parameter set to '+INDEX' and the link/alias got
created since the newname did not leave it at the just the diskgroup level
but specified the file name. 


One other thing that you have to watch out for: The space allocated in ASM
will not get automatically removed if you replace the databases or recover
from errors and can chew up space which you have to remove using asmcmd. And
that led to another problem for me. I navigated to the directory and did an
rm * and it removed the directory as well. So watchout for that one. I think
rm supports the -i (inquire) option. ASM will generate unique names (and
create alias); I haven't found a way to suppress that.




From: oracle-l-bounce@xxxxxxxxxxxxx [mailto:oracle-l-bounce@xxxxxxxxxxxxx]
On Behalf Of Ram Raman
Sent: Thursday, April 17, 2008 3:41 PM
To: oracle-l
Subject: RMAN clone with ASM


Hi all,


we have a 10g production system on ASM. We have a test server with ASM too
and has multiple databases sharing the ASM in test. 

I cloned the production system (PPRD) last month to another system (PSPLAY).
We cloned by doing a recovery of production on the test server. (Procedures
left by the previous DBA). We now want to clone the DEV db with production. 

Last time, after we cloned our production system the files in the test
server were restored with production directory structure:

ASMCMD> ls -ltr
Type      Redund  Striped  Time             Sys  Name
                                            N    psidxtools =>
                                            N    psindex1 =>
                                            N    psindex2 =>
                                            N    psindex3 =>
                                            N    psindex4 =>
                                            N    psidx_amlarge =>

As you can see it restored them in +INDEX/PPRD/... and created a link to

This is despite using rename the files during RMAN restore:

configure device type disk parallelism 3;
set newname for datafile 1 to  '+SYSTEM/PSPLAY/datafile/system';
set newname for datafile 2 to
set newname for datafile 3 to  '+SYSTEM/PSPLAY/datafile/sysaux';
set newname for datafile 4 to  '+DATA/PSPLAY/datafile/users.386.603041941';
restore database ;
switch datafile all;

I am new to ASM and that was my first time using ASM and cloning in the
environment. I had to do it several times to get the clone done. I remember
using the above script, but I could have slipped too and forgot to rename
the files, but it is unlikely. The above is a copy paste from the script
which is still out there. I have checked all the RMAN restore scripts, they
all rename the datafile to PSLAY.

Currently, I am trying to clone the DEV database with production. I do not
want the PSPLAY to get overwritten in the process if RMAN restores the files
I googled and checked the ASM book, but could not find an answer. Will the
PSLAY data get overwritten while doing cloning? Or can someone vouch that it
must have happened because I must have run a script without renaming the
files? Thanks



Other related posts: