RMAN clone with ASM

  • From: "Ram Raman" <veeeraman@xxxxxxxxx>
  • To: oracle-l <oracle-l@xxxxxxxxxxxxx>
  • Date: Thu, 17 Apr 2008 16:40:57 -0500

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> pwd
+INDEX/PSPLAY/DATAFILE

ASMCMD> ls -ltr
Type      Redund  Striped  Time             Sys  Name
                                            N    psidxtools =>
+INDEX/PPRD/DATAFILE/PSIDXTOOLS.261.645115691
                                            N    psindex1 =>
+INDEX/PPRD/DATAFILE/PSINDEX.262.645126073
                                            N    psindex2 =>
+INDEX/PPRD/DATAFILE/PSINDEX.274.645115683
                                            N    psindex3 =>
+INDEX/PPRD/DATAFILE/PSINDEX.273.645137733
                                            N    psindex4 =>
+INDEX/PPRD/DATAFILE/PSINDEX.272.645137735
                                            N    psidx_amlarge =>
+INDEX/PPRD/DATAFILE/PSIDX_AMLARGE.271.645137737
=========================================================================================================================

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

This is despite using rename the files during RMAN restore:

run
{
configure device type disk parallelism 3;
set newname for datafile 1 to  '+SYSTEM/PSPLAY/datafile/system';
set newname for datafile 2 to
'+UNDO/PSPLAY/datafile/undotbs.256.630181055';
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;
}
exit

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
to "+INDEX/PPRD/DATAFILE/..." or "+DATA/PPRD/DATAFILE/...."

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

Thanks.

Other related posts: