Sunday, February 17, 2008

CONTROL_FILE_RECORD_KEEP_TIME and RMAN

Our financial database has about 5 terabytes (TB) data. In the upgrade project, we maintein more than 5 instances (QA, Staging, Conversion, Development, Static, etc) running. That creates big challenge in backing up all instances.

During a period of days, the Veritas backup server ran very slow and took more than 24 hours to back up one instance. When we used one backup to refresh (restore) another instance, we kept geeting "missing files" or "expired files" from the backup set, such as:

MAN-00571: ==================================
RMAN-00569: == ERROR MESSAGE STACK FOLLOWS ==
RMAN-00571: =================================
RMAN-03002: failure of restore command at 01/24/2008 11:35:15
RMAN-06026: some targets not found - aborting restore
RMAN-06023: no backup or copy of datafile 1381 found to restore
RMAN-06023: no backup or copy of datafile 1382 found to restore

But, the Veritas log and command "RMAN> list backup of datafile 1381 ; " clearly indicate that the data file was included in a backup piece.

After I cheked the Verita log carefully, I found that some backupieces that were just created by the script were deleted at the end of same backup script.

The reason is that RMAN backup uses target control file instead of recovery catalog. The parameter "CONTROL_FILE_RECORD_KEEP_TIME = 1" in the init file makes RMAN delete all backuppieces that was backed up 24 hours (1 day) ago, even "RMAN retention policy is set to redundancy 3;" in the RMAN configuration.

Be careful when you use CONTROL_FILE_RECORD_KEEP_TIME!

No comments: