export ORACLE_HOME=/oracle/oracle11g
$ORACLE_HOME/bin/rman target <USERNAME>/<PASSWORD>@<ORACLE-SID> catalog <CATALOG-USER>/<PASSWORD>@<CATALOG-SID> <<EOF1
spool log to $ORACLE_HOME/DBA_SCRIPTS/archivelog-backup.log
run
{
allocate channel ch1 type 'sbt_tape'
PARMS="SBT_LIBRARY=/opt/commvault/Base/libobk.so,ENV=(CvOraSID=<NAME_OF_ORACLE_SID>,CvClientName=<Oracle client name in Commvault concole>,CvInstanceName=<The name of theCommvault instance installed i.e. Instance001>),BLKSIZE=262144";
sql 'alter system archive log current';
backup filesperset 32
(archivelog all);
backup current controlfile ;
}
spool off
EOF1