A RMAN restore and recovery that I completed today answered a couple of questions that remained after the recovery that was the topic of my post from June. Both today’s recovery and June’s involved a restore of a production database on another host and a recovery of that database to a particular point in time.
Question 1: How to rename redo logs?
When doing a restore and recovery to a point in time RMAN does not restore the redo logs. So, the production redo log directory does not have to exist on your target. All you have to do is rename the redo logs after the restore and recover rman commands and before the alter database open resetlogs command.
Oracle document 1338193.1 in step 8 titled “Relocate all the online redo logs” documents the needed command and when to run it.
For each production redo log you run a command like this on the mounted but not opened restored and recovered database:
alter database rename file 'old redo log path and name' to 'new redo log path and name';
Question 2: How to I prevent the restored archive logs from filling up the archive filesystem?
It turns out that there is an option of the recover command that limits the amount of space the restored archive logs will take up and there is another option that causes the recover command to delete the archive logs after applying them:
recover database delete archivelog maxsize 50 G;
Otherwise this was the same case as the earlier blog post. But, at least in this case I didn’t worry about archivelogs filling up the filesystem and I was able to put the redo logs where I wanted them.