The restored control file is written to all locations listed in the CONTROL_FILES
initialization parameter.
Note: The until time clause set the time validity for controlfile. By default RMAN looks for
autobackup for 7 days.
If you want to override this then simply use this:
if you multiple backups of the controlfile on a particular day , restore from autobackup
always
restores the latest copy
If you need to restore controlfile from a specific backup then we need to use “SET UNTIL
TIME”
1run
2{
3set until time "to_date('20130218:12:01','yyyymmdd:hh24:mi')";
4restore controlfile from autobackup preview;
5}
Restore Controlfile to a new location
you can run the above command when the database is in a nomount/mount / open states as
you are not overwritting the controlfile
1rman> set dbid xxxxxxx; ( if you need to get the dbid refer to
http://arjudba.blogspot.co.uk/2008/05/how-to-discover-find-dbid.html )
2
3rman> restore spfile from autobackup;
1 rman target =/
2
rman> set dbid = xxxxxx if you need to get the dbid refer to
3 http://arjudba.blogspot.co.uk/2008/05/how-to-discover-find-dbid.html )
4 rman>
5 run
6 {
set controlfile autobackup format for device type disk to
7 '/rmanbackup/oradata/uknppp/cf_%F';
8 restore spfile from autobackup;
9 }
10
11rman> shutdown;
12
rman> startup force nomount;
13
14rman> run
15{
16
17set controlfile autobackup format for device type disk to
18'/rmanbackup/oradata/uknppp/cf_%F';
19restore controlfile from autobackup;
20}
21
https://mdesouza.wordpress.com/2013/02/21/rman-restore-of-controlfile-and-spfile/