Rman Fail
Here is another issue we had with RMAN. This one has been bugging me for years.
We were doing a duplicate using rman. For some reason the recovery catalogue didn’t contain the archive log we needed to do the recovery, so the restore completed, and finished with the familiar error:
|
|
The normal thing to do here is to correct the error, and redo the backup. But we already had the redo logs on the disc, and wanted to be able to apply them.
The problem with that is, we get another error:
|
|
Where PROD is the database we are copying from, and CLONE is the database we are copying to. Now, it is pretty easy to run a create controlfile command to change the name of the database in the controlfile, but we will still be left with an inconsistent database.
The solution is to rename the database in the parameter file.
|
|
Then the database will mount, and we can recover the redo, using the command that is etched on to my brain:
|
|
Once this is done, I created a controlfile using:
|
|
Then it is a simple matter to:
- Edit ccf.sql to change the database name
- Add in the SET keyword to set the database name
- run it
- alter database open resetlogs
I can’t believe something so simple has eluded me for so long!