Professional Documents
Culture Documents
fix:
To perform an incomplete recovery using RMAN use the 'SET UNTIL' command.
The full syntax is available from the Oracle8i Recovery Manager User's Guide.
Syntax is
set until <time/scn/log_seq>
Examples:
set until time 'Jul 01 2002 00:02:00';
set until logseq 1234 thread 1;
set until scn 500;
A retention policy describes which backups will be kept and for how
long.You can use the CONFIGURE RETENTION POLICY command to
create a persistent and automatic backup retention policy. When a
backup retention policy is in effect, RMAN considers backups of
datafiles and control files as obsolete, that is, no longer needed for
recovery, according to criteria that you specify in the CONFIGURE
command. You can then use the REPORT OBSOLETE command to view
obsolete files and DELETE OBSOLETE to delete them.
The term obsolete does not mean the same as expired. A backup is
obsolete when REPORT OBSOLETE or DELETE OBSOLETE determines,
based on the user-defined retention policy, that it is not needed for
recovery. A backup is considered expired only when RMAN performs a
crosscheck and cannot find the file. In short, obsolete means "not
needed," whereas expired means "not found."
Besides affecting full or level 0 datafile and control file backups, the
retention policy affects archived redo logs and level 1 incremental
backups. First, RMAN decides which datafile and control file backups
are obsolete. Then, RMAN considers as obsolete all archived logs and
incremental level 1 backups that are not needed to recover the oldest
datafile or control file backup that must be retained.
You can also disable the retention policy completely, meaning that
RMAN does not consider any backup to be obsolete. To do so, use the
following command:
Recovery Window
Recovery window is not the number if days upto which the backups are
valid . It is period of time that begins with the current time and extends
backward in time to the point of recoverability.
NOTE
=====
You should keep the recovery window time period less than or equal to
the value of the control file parameter
CONTROL_FILE_RECORD_KEEP_TIME to prevent the record of older
backups from being overwritten in the control file.
Backup Redundancy
If you configure the retention policy to NONE, then RMAN does not
consider any backups as obsolete. Consequently, RMAN issues an error
when you run REPORT OBSOLETE without any other options and the
retention policy is set to NONE.
For each datafile for which there are full backup, datafile copy, or level
0 incremental backups, RMAN identifies the oldest full or level 0
backup or copy that is not obsolete under the retention policy being
tested. Any full backup, level 0 incremental backup, or datafile copy of
a datafile older than the one identified in this step is considered
obsolete.
Any archived logs and level 1 incremental backups that are older than
the oldest non-obsolete full backup are then obsolete because there is
no full or level 0 backup to which they can be applied.
Exempting Backups from the Retention Policy
You may want to store a long-term backup, potentially offsite, for much
longer than the time dictated by the retention policy. For example, you
may make a database backup on the first day of every year to satisfy
some regulatory requirement, independent of backups taken for your
ongoing backup and recovery strategy.
You can exempt a backup from the retention policy by using the KEEP
option with the BACKUP command when you create the backup, or the
KEEP option of the CHANGE command to exempt an existing backup.
Note that backups exempted from the retention policy are still fully
valid backups, which can be used in restore and recovery operations
like any other if RMAN judges them to be the best choice available.
You can change the exempt status of a backup using the CHANGE...
KEEP and CHANGE... NOKEEP commands. The NOKEEP option (default)
indicates that the backup is not immune from the configured retention
policy.
You can specify the LOGS option to save archived logs for a possible
incomplete recovery of the long-term backup. When LOGS is specified,
all logs more recent than the backup are kept as long as the backup is
kept. In other words, KEEP UNTIL TIME... LOGS means that RMAN will
keep all logs required to recover the backup as long as the backup is
kept. If you specify NOLOGS, then RMAN does not keep the logs
required to recover the backup. Note that if you use KEEP UNTIL TIME...
with an inconsistent backup, you must use the LOGS option, or that
backup will become unusable when the logs required to recover it are
deleted as obsolete.
You can specify an end date using the UNTIL clause, or either specify
that the backup should be kept FOREVER. If you specify UNTIL, then
RMAN will not mark the backup as obsolete until after the UNTIL date
has passed. Note that it is an error to specify KEEP FOREVER with the
LOGS option, as this would require keeping all redo logs forever.
# Creates a backup and exempts it from retention policy until last day
of 2007