5 Replies Latest reply: Jan 29, 2013 7:12 AM by EdStevens RSS

    RMAN Backup script not deleting old backup!

    Suddhasatwa_Bhaumik
      Hello All

      Server: Solaris 10
      DB: 10.2.0.3

      I have the below code running as a daily incremental backup of my Produciton database:
      run {
      configure device type disk parallelism 3;
      CONFIGURE RETENTION POLICY TO REDUNDANCY 2;
      crosscheck copy of database;
      delete noprompt expired copy of database;
      delete noprompt expired backup;
      delete noprompt expired archivelog all;
      configure controlfile autobackup on;
      BACKUP DEVICE TYPE DISK INCREMENTAL LEVEL 1 FOR RECOVER OF COPY WITH TAG "whole_db_copy"  DATABASE;
      RECOVER COPY OF DATABASE WITH TAG "whole_db_copy";
      sql "alter system switch logfile";
      sql "alter system archive log current";
      backup as compressed backupset archivelog from time 'sysdate-30' until time 'sysdate-3' delete all input;
      crosscheck archivelog all;
      sql "alter system archive log current";
      }
      However, I have to manually delete the old backups and cross check the catalog, because the above script is not doing so!

      Can you kindly advice how it can be achieved?

      Thanks - Suddhasatwa