
It is important that the % parameters are configured in exactly this sequence using exactly these separators:
<DB_NAME_%s:%t:%p:%f>.EXTENSION
•DB_NAME: ORACL in the example above.
•%f is not available for archivelog.
•EXTENSION: .df (for data files), .al (for archive logs) or .cntrl (for the controlfile)
The backup must include the controlfile backup. This can be configured within Oracle RMAN configuration as a default option or by adding the following two RMAN statements right at the beginning:
CONFIGURE CONTROLFILE AUTOBACKUP ON;
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE 'SBT_TAPE' TO '%F';
Note:
It is mandatory to enable the auto backup of the controlfile. If not enabled, Oracle will automatically include the SPFILE in the backup which leads to a format error as the “%f” parameter is not supported for the SPFILE.
See below the complete script:
run {
CONFIGURE CONTROLFILE AUTOBACKUP ON;
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE 'SBT_TAPE' TO '%F';
allocate channel 'dev_0' type 'sbt_tape'
parms 'ENV=(OB2BARTYPE=Oracle8,OB2APPNAME=ORACL,OB2BARLIST=oracle backup specification)';
allocate channel 'dev_1' type 'sbt_tape'
parms 'ENV=(OB2BARTYPE=Oracle8,OB2APPNAME=ORACL,OB2BARLIST=oracle backup specification)';
allocate channel 'dev_2' type 'sbt_tape'
parms 'ENV=(OB2BARTYPE=Oracle8,OB2APPNAME=ORACL,OB2BARLIST=oracle backup specification)';
allocate channel 'dev_3' type 'sbt_tape'
parms 'ENV=(OB2BARTYPE=Oracle8,OB2APPNAME=ORACL,OB2BARLIST=oracle backup specification)';
backup incremental level <incr_level>
format 'oracle backup specification<ORACL_%s:%t:%p:%f>.df' database;
sql 'alter system archive log current'; backup
format 'oracle backup specification<ORACL_%s:%t:%p>.al' archivelog all;
backup
format 'oracle backup specification<ORACL_%s:%t:%p:%f>.cntrl' current controlfile;
}
9