I am trying to migrate my database (11.2.0.4) A to another machine by using rman backup. At present, in the source machine, the redo log file, temp file is stored under the directory foo (/foo
). In the target machine, I would like to store these files under the directory bar (/bar
).
In the past practice, what I did is to create foo for these files and move these files to bar manually after the recovery is complete. RMAN is such a powerful tool that I think there must be some an easy way to satisfy my requirement.
So far, by searching the google, I got a useful rman command for temp file:
set newname for tempfile <fileno> to '<path>'
It seems that there is no similar command for redo file. Before using this command to perform a recovery, I have several questions to ask:
- When we take an full backup, the backup did not go with temp tablespace and redo files, but in the past migration I experienced, I found that when I open (
alter database open resetlogs
)the database after recovery is complete, redo log files and temp files exist. Will rman create this automatically for database? I can`t find the reliable oracle documents for this topic. - To change the path for redo is so boring, I would the finish this task in the rman scripts, is there any command available to rename the redo log file in the rman scripts?
ALTER DATABASE RENAME FILE
commands to specify the path name on the destination host. More...