Con la siguiente ejecución realizamos un backup de controlfile de tal forma que luego resulta sencillo restaurarlo en cualquier ubicación de forma automática.

run {
allocate channel ch1 type disk;
set controlfile autobackup format for device type disk to ‘/software/oracledb/admin/test/cf_%F’;
backup (current controlfile format ‘/software/oracledb/admin/test/ctrl_s%s_p%p’);
}

Si configuramos el parámetro CONTROLFILE AUTOBACKUP con el mismo format donde lo realizamos, podremos restaurar controlfile de forma automàtica.

RMAN> show all;

using target database control file instead of recovery catalog RMAN configuration parameters are:
CONFIGURE RETENTION POLICY TO REDUNDANCY 1; # default
CONFIGURE BACKUP OPTIMIZATION OFF; # default
CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default
CONFIGURE CONTROLFILE AUTOBACKUP ON;
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO ‘/software/oracledb/admin/test/cf_%F’;
CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO BACKUPSET; # default
CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE MAXSETSIZE TO UNLIMITED; # default CONFIGURE ENCRYPTION FOR DATABASE OFF; # default
CONFIGURE ENCRYPTION ALGORITHM ‘AES128’; # default
CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default
CONFIGURE SNAPSHOT CONTROLFILE NAME TO ‘/data/oracledb/orasoft/10.2/dbs/snapcf_test.f’; # default