Re: RMAN clone with ASM

  • From: "Ram Raman" <veeeraman@xxxxxxxxx>
  • To: krish.hariharan@xxxxxxxxxxxx
  • Date: Sun, 20 Apr 2008 01:42:49 -0500

Krish,

That seems to have done it. Thanks a lot.

Ram.


On 4/17/08, krish.hariharan@xxxxxxxxxxxx <krish.hariharan@xxxxxxxxxxxx>
wrote:
>
>  Ram,
>
>
>
> 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
> command).
>
>
>
> 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.
>
>
>
> -Krish
>  ------------------------------
>
> *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> 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: