8 Replies Latest reply: Mar 30, 2012 3:12 PM by Nelson Calero RSS

    Catalog Retention Policy

      Hello, I have databases being backed up using RMAN connected to a recovery catalog. After a few days, the backup files are deleted at the OS level (not using RMAN commands) so that the metadata will remain in the RMAN catalog even after the files have been deleted. Can you tell me how to find the retention period for how long the metadata will be held in the catalog? Thank you!
        • 1. Re: Catalog Retention Policy
          Hemant K Chitale
          The Retention Period is defined by the RETENTION POLICY in RMAN. (A "SHOW ALL" at the RMAN command prompt would show your configured Retention Policy).

          Oracle will mark older backups as OBSOLETE.

          However, if you use non-RMAN methods to delete the backup pieces at the OS level, you'd need to do a CROSSCHECK for RMAN to mark them as EXPIRED. You could also then do a DELETE for RMAN to mark them as DELETEd.

          Hemant K Chitale
          • 2. Re: Catalog Retention Policy
            Pavan DBA
            Extending to what Hemant said...

            If you are taking backup to tape, even we can set retention policy through netbackup software also. In such case, you will not see any RETENTION POLICY set in RMAN configuration parameters.

            So, better idea is to add few lines to your RMAN script.

            crosscheck backup;
            crosscheck archivelog all;
            delete noprompt expired backup;
            delete noprompt expired archivelog all;

            To know how to set retention policy, check here - http://pavandba.com/2011/07/11/how-to-define-rman-retention-policy-time/

            hope this will help
            • 3. Re: Catalog Retention Policy
              So if I continue deleting files at the OS-level without using any RMAN commands to do it, the metedata will stay in the catalog forever?
              • 4. Re: Catalog Retention Policy
                902074 wrote:
                So if I continue deleting files at the OS-level without using any RMAN commands to do it, the metedata will stay in the catalog forever?
                See -http://docs.oracle.com/cd/B28359_01/backup.111/b28270/rcmmaint.htm#CHDJJBHA
                It will be marked as expired in metadata, and upon excuting 'rman delete expired backupset' the information will be removed from metadata forever.
                • 5. Re: Catalog Retention Policy
                  Thank you for that link; that was helpful. Another question I have about this is that I can query information about a database's backup in RC_RMAN_STATUS view going back several months. However, I can only see information for that same database's backups in RC_RMAN_OUTPUT going back 5 days. What would cause something like that to happen?

                  Edited by: 902074 on Mar 27, 2012 8:18 AM
                  • 6. Re: Catalog Retention Policy
                    Hemant K Chitale
                    RC_RMAN_OUTPUT is actually V$RMAN_OUTPUT which is an in-memory view holding upto 32,768 rows OR rows since the last database instance restart, whichever is lesser.

                    Hemant K Chitale
                    • 7. Re: Catalog Retention Policy
                      I was talking about the catalog schema's RC_RMAN_STATUS and RC_RMAN_OUTPUT views. Not SYS's. In the catalog schema, RC_RMAN_OUTPUT is a view of a table called "rout." I'm trying to figure out why that table only holds a few days' worth of metadata when the tables behind RC_RMAN_STATUS ("dbinc" and "rsr") hold several months' worth.

                      RC_RMAN_OUTPUT View:

                      SELECT db_key,
                      rout_skey session_key,
                      rout_recid recid,
                      rout_stamp stamp,
                      rout_text output
                      FROM rout;
                      • 8. Re: Catalog Retention Policy
                        Nelson Calero
                        Which database version are you using?

                        There is not much information about it in the docs, just what Hermant said: :http://docs.oracle.com/cd/E11882_01/backup.112/e10643/rcviews049.htm

                        This note "Rman Catalog Resync Operation is Very slow at 10G [ID 378234.1]" says:
                        The ROUT table contains the RMAN output generated during all rman sessions and is used only by Enterprise Manager. 
                        The ROUT table is cleaned up automatically during each resync operation leaving by default, the last 60 days worth of entries in ROUT. ...
                        So, do you have more records on V$RMAN_OUTPUT than in RC_RMAN_OUTPUT?