2 Replies Latest reply: May 4, 2013 9:11 AM by Shivananda Rao RSS

    Deletion of archive log using RMAN Target in Oracle 10g

    009
      Hi All,
      I recently have noticed that the archive logs have occupied 102 GBs out of the drive and I need to free up some space. When I tried to connect RMAN Catalog using
      connect catalog user@db
      I got error message as
      RMAN-00571: ===========================================================
      RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
      RMAN-00571: ===========================================================
      RMAN-06445: cannot connect to recovery catalog after NOCATALOG has been used
      But I was able to get through using
      connect target user@db
      My Query is can I use
      RMAN> delete noprompt expired archivelog all;
      as given in [how to delete archive log file |https://forums.oracle.com/forums/thread.jspa?threadID=2321257&start=0&tstart=0]
      Or shall I take any other approach to delete the obsolete archive logs?

      Regards,
      *009*
        • 1. Re: Deletion of archive log using RMAN Target in Oracle 10g
          FreddieEssex
          To see how to connect to the catalog:

          http://docs.oracle.com/cd/B28359_01/backup.111/b28273/rcmsynta011.htm

          To delete archivelog you should back them up first. The following will backup and delete your archivelogs after backing them up:
          backup archivelog all delete all input;
          delete expired archivelog will only delete archivelogs that don't exist on disk which RMAN doesn't know bout but you will have to run crosscheck archivelog all first.

          There is a difference between obsolete and expired. Obsolete means not needed, whereas expired means not found.

          More to the point, are you backing up your database at all??

          Are you backing up your database to disk and then backing it up to tape or backing up to tape directly?
          • 2. Re: Deletion of archive log using RMAN Target in Oracle 10g
            Shivananda Rao
            Hello;
            I recently have noticed that the archive logs have occupied 102 GBs out of the drive and I need to free up some space. When I tried to connect RMAN Catalog using
            connect catalog user@db
            I got error message as
            RMAN-00571: ===========================================================
            RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
            RMAN-00571: ===========================================================
            RMAN-06445: cannot connect to recovery catalog after NOCATALOG has been used
            But I was able to get through using
            connect target user@db
            Are you trying to connect it through Grid control ? If connecting through a script, then please post its contents.
            Make sure you are not connecting to the target database using "nocatalog".
            rman target sys/<pwd_of_target>@<target_db> catalog <catalog_schema>/<catalog_schema_pwd>@<catalog_db>
            My Query is can I use
            RMAN> delete noprompt expired archivelog all;
            as given in [how to delete archive log file |https://forums.oracle.com/forums/thread.jspa?threadID=2321257&start=0&tstart=0]
            Or shall I take any other approach to delete the obsolete archive logs?

            Regards,
            *009*
            Are these archives backed up ? The above command only updates the RMAN repository if in case the archives were delete manually at OS level.
            I would recommend you to backup these archives and then delete them.
            RMAN>backup archivelog all not backedup 1 times delete input;
            If these archives are already backed up and have not been deleted from the disk, then you can use the below command
            RMAN>delete force noprompt archivelog all completed before 'SYSDATE-n';
            where "n" is the number of days behind the current date. Make sure to verify if these archives have been backed up before deleting.


            Regards,
            Shivananda