RMAN resotre tape backup to different machine

Hello All,
I am taking RMAN backup of production database to tape.
I want to restore the production backup to different machine with different directory structure and with different name.
I dont want to use RMAN cloning.

Thanks
Dev
devenjoshi2002Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

johnsoneSenior Oracle DBACommented:
I am by no means an expert on rman, but I went through a similar restore recently.

The basics idea is that you need Oracle installed on the new machine.  Whatever backup software is involved needs to be set up to talk to the library.

For each datafile, you need a command to tell it where to restore to.  The basic command is this:

SET NEWNAME FOR DATAFILE 1 TO '<new_name>;
SET NEWNAME FOR DATAFILE 2 TO '<new_name>;
...

If this is a hot backup and you will need to restore archives, you will also want this command:

SET ARCHIVELOG DESTINATION TO '<path>';
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
mrjoltcolaCommented:
johnsone is correct. Though, make sure to add SWITCH DATAFILE ALL (after the datafile restores)

run {
...
SET NEWNAME FOR DATAFILE 1 TO '<new_name>;
SET NEWNAME FOR DATAFILE 2 TO '<new_name>;
restore ...
recover ...
SWITCH DATAFILE ALL;
};

so the restored controlfile is switched over to the new paths.

Once you have the controlfile, and startup force mount, then proceed to restore a full backupset.

Regarding the restore, there are other ways you can do it. If you pull the backupset from tape and have it in a file, you can move the file(s) physically to the new machine and catalog the backupset into a new database and restore from it. That might help you if you cannot access the tape from the new server.

Hopefully you have a controlfile autobackup, so you can move that to your new disk structure under $ORACLE_HOME/dbs (unix) or $ORACLE_HOME/database (Windows). So first, set your dbid from RMAN, then tell rman to restore spfile and restore controlfile from autobackup. As long as you did not change naming convention, it should find the autobackup if you placed it correctly. Once restored, startup force mount and proceed to full restore.

Oracle 10g RMAN also allows cataloging backupsets from disk, regardless if they were ever in the controlfile or not.

RMAN> catalog backuppiece '/ora/backup/O1_MF_NNND1_TAG20060627T145650_2B2G9KMB_.BKP';

This would be after you had recovered your controlfile and had an instance in mount mode and were ready to restore.
0
devenjoshi2002Author Commented:
Mainly I want to change the name of database while restoring the tape backup which I have taken from production database.
Is this possible?
Restore to different machine with different directory structure , yes I can use SET NEWNAME FOR DATAFILE  , and SWITCH DATAFILE ALL command.

0
johnsoneSenior Oracle DBACommented:
Doing a restore and not a clone, I do not believe that changing the name as part of rman is possible.  You can easily run the nid utility to do that after the fact.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Oracle Database

From novice to tech pro — start learning today.