Home » RDBMS Server » Backup & Recovery » RMAN duplicate from ASM instance to NON-ASM instance (Oracle 10.2.0.1, RHEL5)
icon5.gif  RMAN duplicate from ASM instance to NON-ASM instance [message #405535] Thu, 28 May 2009 05:06 Go to next message
vialde
Messages: 4
Registered: May 2009
Junior Member
I'm sorry if this has been covered elsewhere, but my search of the forum didn't turn anything up.

I'm attempting to duplicate a database using RMAN.

Both databases are 10.2.0.1 on identical RHEL5 machines.

The target database is Using ASM and the auxiliary database is using normal filesystems.

When I attempt the duplication I get the following error message
ORA-19504: failed to create file "+DATA"
ORA-17502: ksfdcre:4 Failed to create file +DATA
ORA-15001: diskgroup "DATA" does not exist or is not mounted


I'm using the following script
rman target <USER>/<PASS>@<TARGET> AUXILIARY <USER>/<PASS> <<-EOF
        RUN {

        SET NEWNAME FOR DATAFILE 1 to '/u01/oradata/< auxiliary >/system.445.624113309';
        ...
        ...
        ...
        SET NEWNAME FOR DATAFILE 2 to '/u01/oradata/<auxilliary>/undotbs1.447.624113309';

        set until time to_date('2009-05-22:12:00:00','YYYY-MM-DD:hh24:mi:ss');
        DUPLICATE TARGET DATABASE TO <auxilliary>

        NOFILENAMECHECK
         LOGFILE   GROUP 1 ('/u01/oradata/<auxiliary>/redo/redo1.log',
                    '/u02/oradata/<auxiliary>/redo/redo1b.log',
                    '/u03/oradata/<auxiliary>/redo/redo1c.log') SIZE 10M REUSE,
           GROUP 2 ('/u02/oradata/<auxiliary>/redo/redo02a.log',
                    '/u03/oradata/<auxiliary>/redo/redo02b.log',
                    '/u01/oradata/<auxiliary>/redo/redo02c.log') SIZE 10M REUSE,
           GROUP 3 ('/u03/oradata/<auxiliary>/redo/redo03a.log',
                    '/u01/oradata/<auxiliary>/redo/redo03b.log',
                    '/u02/oradata/<auxiliary>/redo/redo03c.log') SIZE 10M REUSE;

        }

        EOF



I guess my question is what's the procedure/pre-requisites for an ASM to Flatfile duplicate using RMAN?

Thanks for reading.

Regards,
Cary

[Updated on: Thu, 28 May 2009 05:37]

Report message to a moderator

Re: RMAN duplicate from ASM instance to NON-ASM instance [message #405569 is a reply to message #405535] Thu, 28 May 2009 07:21 Go to previous messageGo to next message
Mahesh Rajendran
Messages: 10672
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
Quote:
SET NEWNAME FOR DATAFILE 1 to '/u01/oradata/< auxiliary >/system.445.624113309';



It could be useful to see the actual filename used (in runtime) instead of substitution.
There are two approaches do to this.
What I do is to query the database /catalog prior, replace the whole path, spool the output and use it during duplication.
Something like this.
Please note that in this case,
I am duplicating from one ASM (+ORADATA/widw10g) to another ASM(+wdev8).
In your case, replace the path to where ever you want(a filesystem i mean).

A part of the script. Do this for all datafiles and logfiles and spool the output.

oracle@eddie#cat renameFiles | grep DATAFILE

SELECT 'set newname for datafile '||file#||' to '''||replace(name,'+ORADATA/widw10g','+wdev8') ||''';' from  V\$DATAFILE; 


This would be a sample output.
oracle@eddie#cat rename*.lst

set newname for datafile 1 to '+wdev8/system01.dbf';
set newname for datafile 2 to '+wdev8/undotbs01.dbf';


and then call the spooled output inside the duplicate script.

Or use the second method.

Set this in init.ora used to mount the auxillary.
In this case, I am converting datafiles in +ORADATA/prod to +TEST8.
You can similarly use a filesystem. Substitute your path instead of +TEST8.

DB_FILE_NAME_CONVERT=+ORADATA/prod,+TEST8
LOG_FILE_NAME_CONVERT=+ORADATA/prod,+TEST8

[Updated on: Thu, 28 May 2009 07:28]

Report message to a moderator

Re: RMAN duplicate from ASM instance to NON-ASM instance [message #405573 is a reply to message #405535] Thu, 28 May 2009 07:36 Go to previous messageGo to next message
vialde
Messages: 4
Registered: May 2009
Junior Member
Mahesh,

Thanks for the quick reply.

The full path I'm using in the 'SET NEWNAME' statements is
/u01/oradata/qbint1/<datafile>

I generated the statements using the same sql that you recommend.

I'm attaching the logfile and the actual script I'm using.

I've noticed that for some reason the log is showing the set newnames with the old path whilst the script has the new paths.

Thanks again for looking at this with me.

Cheers,

Cary
Re: RMAN duplicate from ASM instance to NON-ASM instance [message #405574 is a reply to message #405535] Thu, 28 May 2009 07:38 Go to previous messageGo to next message
vialde
Messages: 4
Registered: May 2009
Junior Member
And here's the script
Re: RMAN duplicate from ASM instance to NON-ASM instance [message #405586 is a reply to message #405535] Thu, 28 May 2009 08:07 Go to previous messageGo to next message
vialde
Messages: 4
Registered: May 2009
Junior Member
Ah-Ha!

Setting the DB_FILE_NAME_CONVERT in the init.ora did the trick!

Thanks!
Re: RMAN duplicate from ASM instance to NON-ASM instance [message #405599 is a reply to message #405586] Thu, 28 May 2009 09:44 Go to previous message
Mahesh Rajendran
Messages: 10672
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
Just a note.
Use either one of the method (manual conversion or using DB_FILE_NAME_CONVERT).
Manual conversion is actually intended for Older version and will work for newer versions too.
Since you are using OMF, it better to use DB_FILE_NAME_CONVERT.
After duplication is done, check if temporary tablespaces were also available.

Previous Topic: Move required_backup_scn?
Next Topic: Database backup
Goto Forum:
  


Current Time: Mon Dec 05 21:19:52 CST 2016

Total time taken to generate the page: 0.07424 seconds