Home » RDBMS Server » Backup & Recovery » Duplicate DB on another host using different paths
Duplicate DB on another host using different paths [message #252722] Thu, 19 July 2007 14:49 Go to next message
lmarin
Messages: 3
Registered: July 2007
Junior Member
Hi,

I have host A with a target DB and want to duplicate (clon) it to host B. Both servers run on Solaris 10, both Oracle installations are 10.2.0.2.

I'm using RMAN in host A, archivelog mode. Backup files are stored in host A. Destination path must be different in host B so I plan to use the "set newname" feature in rman duplicate command.

So, deployment is:

HOST A: RMAN CATALOG, TARGET DB, BACKUP FILES, ARCHIVE LOG FILES.

HOST B: NO RMAN CATALOG, DESIRED AUXILIARY DB.

My question is, how do I tell Oracle in the Duplicate command that the new path set in "set newname" is placed in HOST B and not in HOST A? Thanks.

Leandro
Re: Duplicate DB on another host using different paths [message #252725 is a reply to message #252722] Thu, 19 July 2007 15:24 Go to previous messageGo to next message
DreamzZ
Messages: 1666
Registered: May 2007
Location: Dreamzland
Senior Member
like this

Quote:
RUN
{
SET NEWNAME FOR DATAFILE 1 TO /oracle/data/file2.f; # rename df 1 as file2.f
SET NEWNAME FOR DATAFILE 2 TO /oracle/data/file1.f; # rename df 2 as file1.f
DUPLICATE TARGET DATABASE TO newdb;
}


http://download.oracle.com/docs/cd/B19306_01/backup.102/b14191/rcmdupdb002.htm


you can also use
db_file_name_convert
and
log_file_name_convert
parameter in pfile.
Re: Duplicate DB on another host using different paths [message #252728 is a reply to message #252725] Thu, 19 July 2007 15:37 Go to previous messageGo to next message
lmarin
Messages: 3
Registered: July 2007
Junior Member
Thanks, but in this line:

SET NEWNAME FOR DATAFILE 1 TO /oracle/data/file2.f;

How does Oracle know that "/oracle/data/file2.f" is placed in the other host? Wouldn't RMAN think that /oracle/data is a directory in the source host?

Remember that my catalog, backup files and archive logs are all stored in the source host, and I'm running this script there, not in the destination host. May be I'm wrong but I think I need something like this:

SET NEWNAME FOR DATAFILE 1 TO *HOST_B*/oracle/data/file2.f;

But don't know exactly how to configure "something like this" in RMAN.
Regards,

Leandro.


Re: Duplicate DB on another host using different paths [message #252729 is a reply to message #252728] Thu, 19 July 2007 15:47 Go to previous messageGo to next message
DreamzZ
Messages: 1666
Registered: May 2007
Location: Dreamzland
Senior Member
It would write information into control file ,when you would restore it over another host rman first connect to your controlfile and reads the backup information and from there it would get the information about set new name.

Quote:

But don't know exactly how to configure "something like this" in RMAN

You have another option of setting these parameters in PFILE.
DB_FILE_NAME_CONVERT
&
LOG_FILE_NAME_CONVERT.

[Updated on: Thu, 19 July 2007 15:48]

Report message to a moderator

Re: Duplicate DB on another host using different paths [message #252754 is a reply to message #252728] Thu, 19 July 2007 21:17 Go to previous messageGo to next message
ebrian
Messages: 2794
Registered: April 2006
Senior Member
To create the duplicate database, prior to specifying a newname for the restored files, you first need to ensure that the backups are accessible by the remote host (host B).
Re: Duplicate DB on another host using different paths [message #252939 is a reply to message #252754] Fri, 20 July 2007 15:49 Go to previous message
lmarin
Messages: 3
Registered: July 2007
Junior Member
Thank you all for your insight.
Problem was solved running RMAN from the destination host so path where all considered local to it. I've copied backup and archivelog files to that host before duplicating and updated tnsnames so Oracle could find target and catalog in origin.

DB_FILE_NAME_CONVERT was also very useful.
Thanks and regards.
Previous Topic: Restore datafile to new location on a new host
Next Topic: recovery Senario
Goto Forum:
  


Current Time: Wed May 15 03:25:28 CDT 2024