1 Reply Latest reply: Jun 27, 2012 8:49 AM by fjfranken RSS

    rman script not working properly

    Arun Rao
      HI all;

      following is the rman script whiich is not working properly please suggest the correction

      obsolete and expired archivelog are not deleting

      echo "RUN { " > $CMDFILE
      echo      "allocate channel d1 type disk;" >> $CMDFILE
      #echo "CONFIGURE CONTROLFILE AUTOBACKUP OFF;" >> $CMDFILE
      echo      "CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 7 DAYS;" >> $CMDFILE
      echo     "CONFIGURE ARCHIVELOG DELETION POLICY TO BACKED UP 2 TIMES TO DEVICE TYPE disk;" >> $CMDFILE
      echo     "CONFIGURE CONTROLFILE AUTOBACKUP ON;" >> $CMDFILE
      echo     "backup incremental level 0 as compressed backupset database skip readonly;" >> $CMDFILE
      echo     "backup as compressed backupset archivelog all;" >> $CMDFILE
      echo     "backup current controlfile;" >> $CMDFILE
      #echo "backup spfile;" >> $CMDFILE
      #echo "CONFIGURE CONTROLFILE AUTOBACKUP ON;" >> $CMDFILE
      echo "release channel d1; " >> $CMDFILE
      echo "}" >> $CMDFILE
      echo "list backup summary;" >> $CMDFILE
      echo "allocate channel for maintenance type disk;" >> $CMDFILE
      echo     "crosscheck backup of database; " >> $CMDFILE
      echo     "crosscheck backup of controlfile; " >> $CMDFILE
      echo     "crosscheck archivelog all;" >> $CMDFILE
      echo      "delete noprompt expired backup of database; " >> $CMDFILE
      echo      "delete noprompt expired backup of controlfile; " >> $CMDFILE
      echo      "delete noprompt expired archivelog all;" >> $CMDFILE
      echo      "report obsolete; " >> $CMDFILE
      echo "delete noprompt force obsolete;" >> $CMDFILE
      echo "release channel;" >> $CMDFILE
      echo "exit;" >> $CMDFILE