?
Solved

Delete old backups in RMAN

Posted on 2000-03-31
5
Medium Priority
?
1,112 Views
Last Modified: 2008-02-01
What determines which backup set gets reported in the command "report obsolete" in RMAN? Is it the parameter CONTROL_FILE_RECORD_KEEP_TIME  in the init.ora file? Can anyone help with this?

Thanks in advance.
0
Comment
Question by:rsolomon
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 5

Accepted Solution

by:
sbenyo earned 400 total points
ID: 2674125
Hi,

The REPORT OBSOLETE command determines its obsolete backup sets from the recovery catalog, which means from its own tables/views.

The recovery catalog is a set of tables/views that keep all the information about backup sets / backup pieces of RMAN.

For example, all the backup sets information is kept in the view RC_BACKUP_SET (under the recovery catalog user).

When issuing backups, the controlfile is updated with the backup information.

The controlfile also keeps records about backup sets and backup pieces of RMAN.
The controlfile keeps two types of records: permanent records and reusable records.
The parameter CONTROL_FILE_RECORD_KEEP_TIME determines the minimum time after which the reusable records in the controlfile will be reused.
The default is 7 days and this is done to control the growth of the controlfile.
To see information about the records in the controlfile look at the view:
V$CONTROLFILE_RECORD_SECTION

RMAN resyncs its data from the controlfile, so it is important that resyncs in RMAN will occur in a frequency less than the CONTROL_FILE_RECORD_KEEP_TIME else RMAN may lose records that were overriden in the controlfile.
0
 

Author Comment

by:rsolomon
ID: 2674237
So what you are telling me is that CONTROL_FILE_RECORD_KEEP_TIME controls what is obsolete or not?
0
 
LVL 5

Expert Comment

by:sbenyo
ID: 2677460
The CONTROL_FILE_RECORD_KEEP_TIME is NOT controling what is obsoelete.

Obsolete which means what backup sets are no longer needed for recovery, is determined from RMAN's catalog by checking the backup sets SCNs that are needed for recovery.

RMAN's catalog gets its data from the controlfile, and the catalog is updated whenever a resynch occurs.

The controlfile itself gathers backup set data and keeps it in records.
A new record is added for each new backup set.
The CONTROL_FILE_RECORD_KEEP_TIME controls only the records in the controlfile, and it means how long the records will be kept (added) to the controlfile without being runover again.

Let's take an example.
You perform a backup which adds 3 new backupsets.
The controlfile adds these 3 backupsets to itself and grows.
When you issue a recovery, or a new backup (or manual resync) RMAN reads the controlfile records and adds the information to its own CATALOG.

lets say 7 days passed. (The time in CONTROL_FILE_RECORD_KEEP_TIME)
Now you backup again and add 3 new backup sets.
The new backup sets records will be added to the controlfile over the first backupsets!

If RMAN's catalog did not read the first 3 backup set records from the controlfile they are now lost forever.

To summerize it simply:

1) RMAN determines Obsolete backup sets by comparing SCNs according to its CATALOG data

2) RMAN updates its CATALOG data by reading the controlfile records

3) The controlfile adds record with each new backup set

4) The controlfile will runover records if it reached the time specified in the CONTROL_FILE_RECORD_KEEP_TIME.

5) Because of what's written above, always resync the CATALOG before the time in the CONTROL_FILE_RECORD_KEEP_TIME, so the CATALOG will not lose records.

Is it clear now ?

0
 
LVL 5

Expert Comment

by:sbenyo
ID: 2677532
The CONTROL_FILE_RECORD_KEEP_TIME is NOT controling what is obsoelete.

Obsolete which means what backup sets are no longer needed for recovery, is determined from RMAN's catalog by checking the backup sets SCNs that are needed for recovery.

RMAN's catalog gets its data from the controlfile, and the catalog is updated whenever a resynch occurs.

The controlfile itself gathers backup set data and keeps it in records.
A new record is added for each new backup set.
The CONTROL_FILE_RECORD_KEEP_TIME controls only the records in the controlfile, and it means how long the records will be kept (added) to the controlfile without being runover again.

Let's take an example.
You perform a backup which adds 3 new backupsets.
The controlfile adds these 3 backupsets to itself and grows.
When you issue a recovery, or a new backup (or manual resync) RMAN reads the controlfile records and adds the information to its own CATALOG.

lets say 7 days passed. (The time in CONTROL_FILE_RECORD_KEEP_TIME)
Now you backup again and add 3 new backup sets.
The new backup sets records will be added to the controlfile over the first backupsets!

If RMAN's catalog did not read the first 3 backup set records from the controlfile they are now lost forever.

To summerize it simply:

1) RMAN determines Obsolete backup sets by comparing SCNs according to its CATALOG data

2) RMAN updates its CATALOG data by reading the controlfile records

3) The controlfile adds record with each new backup set

4) The controlfile will runover records if it reached the time specified in the CONTROL_FILE_RECORD_KEEP_TIME.

5) Because of what's written above, always resync the CATALOG before the time in the CONTROL_FILE_RECORD_KEEP_TIME, so the CATALOG will not lose records.

Is it clear now ?

0
 

Author Comment

by:rsolomon
ID: 2680543
Yes
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Working with Network Access Control Lists in Oracle 11g (part 1) Part 2: http://www.e-e.com/A_9074.html So, you upgraded to a shiny new 11g database and all of a sudden every program that used UTL_MAIL, UTL_SMTP, UTL_TCP, UTL_HTTP or any oth…
Checking the Alert Log in AWS RDS Oracle can be a pain through their user interface.  I made a script to download the Alert Log, look for errors, and email me the trace files.  In this article I'll describe what I did and share my script.
This video shows information on the Oracle Data Dictionary, starting with the Oracle documentation, explaining the different types of Data Dictionary views available by group and permissions as well as giving examples on how to retrieve data from th…
This video shows how to Export data from an Oracle database using the Original Export Utility.  The corresponding Import utility, which works the same way is referenced, but not demonstrated.
Suggested Courses

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question