control_file_record_keep_time – the value indicates number of days before reusable record is overwritten, if set to 0 reusable record is not expanded. The default value is 7. Reusable section is where archive log records and backup information are kept. This parameter can be modified without restart of the instance.
— backup control file in binary format to a file named /tmp/x.ctl, it will preserve the backup information of the database
SQL> alter database backup controlfile to ‘/tmp/x.ctl’;
— backup control file in readable format in /tmp/x.trc, the script created doesn’t contain information about backups so if you backup in the binary format it will keep the backup information
SQL> alter database backup controlfile to trace as ‘/tmp/x.trc’;
As RMAN needs a consistent view of the control file it takes a backup of the controlfile by creating a snapshot and during the backup RMAN uses the snapshot of the controlfile. By default the snapshot controlfile is created in $ORACLE_HOME/dbs/snapcf_ORACLE_SID.f which can be changed by setting the following parameter in RMAN
$ rman target /
— display parameter value
RMAN> show all;
CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/u01/10.2.0.4/TESTDB/snapcf_TESTDB.f'; # default
— set to new path for controlfile snapshot
RMAN> CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/u02/TESTDB/snapcf_TESTDB.f';
When multiple RMAN are running one could run into an issue RMAN-08512 where RMAN is waiting for getting a lock on snapshot controlfile header. To find the session run the following SQL.
SELECT vs.sid, vs.username, vs.program, vs.module, TO_CHAR(vs.logon_time, 'DD-MON-YYYY HH24:MI:SS')
FROM v$session vs, v$enqueue_lock vel
WHERE vs.sid = vel.sid AND vel.type = 'CF' AND vel.id1 = 0 AND vel.id2 = 2