13 Replies Latest reply: Apr 25, 2013 4:08 AM by Thunder2777 RSS

    Redo Archive Log default Duration

    Thunder2777
      Hi All

      What is the Default Redo Archive Log Duration in Oracle 10g R2?
      I mean How Long they are kept by the Database before Deletion.

      If RMAN is configured for Deletion e.g.

      RMAN> CONFIGURE ARCHIVELOG DELETION POLICY TO APPLIED ON STANDBY;


      Then RMAN will Automatically Delete Old Archives or not?

      Regards
      Thunder2777
        • 2. Re: Redo Archive Log default Duration
          Thunder2777
          Thanks Sunny

          Again your Recommended Article in which Mseberg Highlights

          *"Setting the Policy will not delete the Archive logs on the Standby. ( I found a thread where the Data Guard product manager says "The deletion policy on both sides will do what you want" ). However I still like to clean them off with RMAN"*

          I have set RAMN Deletion Policy on Both Primary DB and Standby DB as

          RMAN> CONFIGURE ARCHIVELOG DELETION POLICY TO APPLIED ON STANDBY;

          Again Msberg says to Configure RMAN to purge archivelogs after applied on standby whch
          means just Setting Policy will NOT Delete them.

          2. The Retention Period of Redo Archive Log is How Long by Default?
          Oracle Database will keep Redo Archive log for how many days?

          In this article he has Manually Delete them

          *"delete noprompt ARCHIVELOG UNTIL TIME 'SYSDATE-8';"*

          Regards
          Thunder2777
          • 3. Re: Redo Archive Log default Duration
            Hemant K Chitale
            There is no "default" retention policy for archivelogs.

            If you are using an FRA with db_recovery_file_dest, Oracle will automatically maintain free space in the FRA by purging older archivelogs and obsolete backups (backups older than the retention policy). In general, it starts purging after usage in the FRA exceeds 85%

            If you are NOT using an FRA, Oracle does NOT purge archivelogs automatically. It is left to you to purge them with OS and/or RMAN commands.


            Hemant K Chitale
            • 4. Re: Redo Archive Log default Duration
              Thunder2777
              Thanks Hemant K Chitale

              For Clarify the issue.

              But one question

              when we set 2 parameters

              log_archive_dest_1 location="E:\ORACLE\FRA\STLDB2\ARCHIVELOG\",
              valid_for=(ALL_LOGFILES,ALL_ROLES)

              *.db_recovery_file_dest='E:\Oracle\FRA\STLDB2\ARCHIVELOG\'

              Then SHOULD NOT RDBMS perform it's function e.g. Purging of Archive log > 85%
              as these are it's requirements and we have fulfill it?

              Kind Regards
              Thunder2777
              • 5. Re: Redo Archive Log default Duration
                Hemant K Chitale
                No. If you are not using an FRA for the archivelogs Oracle does not know the size of the filesystem, it does not know what (other) files are in the same filesystem. It cannot determine the 85% threshold.


                Hemant K Chitale
                • 6. Re: Redo Archive Log default Duration
                  Thunder2777
                  Thanks Hemant K Chitale

                  For clarifying the issue.

                  So if we Change Settings/parametrs like Default e.g.

                  log_archive_dest_1 location="D:\oracle\flash_recovery_area\STLDB2\ARCHIVELOG",
                  valid_for=(ALL_LOGFILES,ALL_ROLES)

                  *.db_recovery_file_dest='D:\Oracle\flash_recovery_area\STLDB2\ARCHIVELOG\'

                  Will now it work or Not?

                  Regards
                  Thunder2777
                  • 7. Re: Redo Archive Log default Duration
                    Hemant K Chitale
                    No, it will not. Even though they may the same directory by physical name ... to Oracle they are to logically different directories.

                    Oracle monitors usage of FRA space by ArchiveLogs only if the LOG_ARCHIVE_DEST_1 = location=USE_DB_RECOVERY_FILE_DEST


                    Note: You can query V$FLASH_RECOVERY_AREA_USAGE to see this. If ArchiveLogs are using LOG_ARCHIVE_DEST_1 = location=USE_DB_RECOVERY_FILE_DEST, then they appear in V$FLASH_RECOVERY_AREA_USAGE


                    Hemant K Chitale

                    Edited by: Hemant K Chitale on Apr 25, 2013 2:42 PM
                    • 8. Re: Redo Archive Log default Duration
                      Mahir M. Quluzade
                      Thunder2777 wrote:
                      Thanks Hemant K Chitale

                      For clarifying the issue.

                      So if we Change Settings/parametrs like Default e.g.

                      log_archive_dest_1 location="D:\oracle\flash_recovery_area\STLDB2\ARCHIVELOG",
                      valid_for=(ALL_LOGFILES,ALL_ROLES)

                      *.db_recovery_file_dest='D:\Oracle\flash_recovery_area\STLDB2\ARCHIVELOG\'

                      Will now it work or Not?
                      It will work as :
                      your archived logs will store "D:\oracle\flash_recovery_area\STLDB2\ARCHIVELOG"
                      your copy backups, flashback logs, backup sets will store db_recovery_file_dest='D:\Oracle\flash_recovery_area\STLDB2\ARCHIVELOG\' folder, too.

                      You can see, for example BACKUPSET folder under D:\Oracle\flash_recovery_area\STLDB2\ARCHIVELOG and archived log file in this folder.

                      Updated

                      Hemant K Chitale Note: You can query V$FLASH_RECOVERY_AREA_USAGE to see this. If ArchiveLogs are using LOG_ARCHIVE_DEST_1 = location=USE_DB_RECOVERY_FILE_DEST, then they appear in V$FLASH_RECOVERY_AREA_USAGE

                      Thanks
                      Mahir M. Quluzade
                      http://www.mahir-quluzade.com

                      Edited by: Mahir M. Quluzade on Apr 25, 2013 11:46 AM
                      • 9. Re: Redo Archive Log default Duration
                        Thunder2777
                        Hi Hemant K Chitale
                        I have checked V$FLASH_RECOVERY_AREA_USAGE. Results are follow

                        Primary DB

                        SQL> select * from V$FLASH_RECOVERY_AREA_USAGE;

                        FILE_TYPE PERCENT_SPACE_USED PERCENT_SPACE_RECLAIMABLE NUMBER_OF_FILES
                        ------------ ------------------ ------------------------- ---------------
                        CONTROLFILE 0 0 0
                        ONLINELOG 0 0 0
                        ARCHIVELOG .47 0 7
                        BACKUPPIECE 0 0 0
                        IMAGECOPY 0 0 0
                        FLASHBACKLOG 0 0 0

                        6 rows selected.

                        Standby DB

                        SQL> select * from V$FLASH_RECOVERY_AREA_USAGE;

                        FILE_TYPE PERCENT_SPACE_USED PERCENT_SPACE_RECLAIMABLE NUMBER_OF_FILES
                        ------------ ------------------ ------------------------- ---------------
                        CONTROLFILE 0 0 0
                        ONLINELOG 0 0 0
                        ARCHIVELOG 0 0 0
                        BACKUPPIECE 0 0 0
                        IMAGECOPY 0 0 0
                        FLASHBACKLOG 0 0 0

                        6 rows selected.

                        Now my question is How we will monitor Standby DB FRA? Although Data guard Configuration is
                        set on Both Primary DB and Standby DB.

                        CONFIGURE ARCHIVELOG DELETION POLICY TO STANDBY;

                        Now Primary DB FRA is managed by Oracle RDBMS.
                        Whereas we have to maintain Standby DB FRA by ourself but how?

                        Regards
                        Thunder2777
                        • 10. Re: Redo Archive Log default Duration
                          Hemant K Chitale
                          On the standby that I used to manage I had enough space for 1 weeks archivelogs. I would run BACKUP ARCHIVELOG .... DELETE INPUT every Sunday. You could include NOT BACKED UP 2 TIMES TO TAPE to ensure that the delete is done only after two separate backups of the archivelogs.
                          The Standby would "monitor" the FRA only if it is OPENed as a Primary (I guess).


                          Hemant K Chitale
                          • 11. Re: Redo Archive Log default Duration
                            Thunder2777
                            Thanks again Hemant K Chitale

                            You mean by using RMAN on Standby DB, I issue following commands to make a backup.
                            Since we Don't have Tape Backup. We will use disk1, disk2 and disk3.
                            First we configure it to Disk
                            Here we specify the computer system name and path to backup folder
                            e.g. IT_Server2/D:/backup/%U

                            *1. RMAN> CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT '/?/%U';*

                            *2. RMAN> BACKUP DEVICE TYPE DISK DATABASE*
                            FORMAT '/disk1/backup/%U', '/disk2/backup/%U', '/disk3/backup/%U';

                            *3. RMAN> BACKUP ARCHIVELOG LIKE '/arch%' DELETE ALL INPUT;*

                            RMAN> BACKUP DEVICE TYPE sbt ARCHIVELOG ALL NOT BACKED UP 2 TIMES;
                            Not applicable as we have set it to Hard disk.

                            Am I right?

                            Regards
                            Thunder2777










                            CONFIGURE SNAPSHOT CONTROLFILE NAME TO '?/oradata/snap.cf';


                            Kind Regards
                            Thunder2777
                            • 12. Re: Redo Archive Log default Duration
                              Hemant K Chitale
                              If your site doesn't have a tape library, yes .... you would run disk backups.

                              I would prefer a tape library at each site and the ability to ship tapes from one site to another.



                              Hemant K Chitale
                              • 13. Re: Redo Archive Log default Duration
                                Thunder2777
                                Thanks Hemant K Chitale

                                For your help and clarifying issues.

                                Kind Regards
                                Thunder2777