Tuesday, November 20, 2012

Restoring a Database with Rman Controlfile Parameters

There are occasions when you recieve a complete backup of a database from a  place different then yours and have to do a restore. normally a restore is simple . put the files in a directory run rman catalog on them and you are done. but what if you have rman configuration parameters stored in the controlfile and you are trying to duplicate the database. During a duplicate rman will restore the controlfile and then use the parameters associated in the controlfile for the next steps.
I hit this issue when the db i was trying to duplicate  has sbt_tape parameter and the host i was trying to duplicate on  has no MML configured to it.
After trying a couple of times with no luck. I opened an SR and got a response from a very helpful Oracle Support guy (even on Sev 3).
Below are the procedures i followed to solve my rather simple problem.
1. Startup the auxiliary database in nomount
2. Restore the controlfile from the autobackup piece
RESTORE CONTROLFILE FROM '.... location and name of the autobackup piece ...';
3. Mount the database:
4. Clear the SBT related configurations, CHANNEL and DEVICE - Do a show all and make sure there are no parameters that you might have an issue with
See the RMAN reference guide under CONFIGURE for details on how to do this.
5. In SQLPLUS backup the controlfile:
ALTER DATABASE BACKUP CONTROLFILE TO '/location/of/backups/control.dbf';
6. Startup the auxiliary database in nomount
7. Move the controlfile autoback piece out of the backup location
8. Run the Duplicate, which now will use the controlfile copy we created with correct RMAN configuration.

I was unaware of doing something this way and i guess its good to learn something new everyday.

Google Search

Powered By Blogger