Oracle® Database Backup and Recovery Reference 10g Release 2 (10.2) Part Number B14194-03 |
|
|
PDF · Mobi · ePub |
archlogRange::=
A subclause used to specify an archived log or range of archived redo logs files for use in backup, restore, recovery, and maintenance operations.
When backing up archived redo logs, RMAN can perform archived log failover automatically. RMAN backs up the log when at least one archived log corresponding to a given log sequence number and thread is available. Also, if the copy that RMAN is backing up contains corrupt blocks, then it searches for good copies of these blocks in other copies of the same archived logs.
Specifying a range of archived redo logs does not guarantee that RMAN includes all redo data in the range: for example, the last available archived log file may end before the end of the range, or an archived log file in the range may be missing from all archiving destinations. RMAN includes the archived redo logs it finds and does not issue a warning for missing files.
Note:
Query theV$ARCHIVED_LOG
view or RC_ARCHIVED_LOG
recovery catalog view to determine the time stamps, SCNs, and log sequence numbers for an archived log. For information on how to use the NLS_LANG
and NLS_DATE_FORMAT
environment variables to specify the format for the time, see Oracle Database Reference.Syntax Element | Description |
---|---|
ALL |
Specifies all available archived logs. |
LIKE ' string_pattern ' |
Specifies all archived logs that match the specified string_pattern . The same pattern matching characters that are valid in the LIKE operator in the SQL language can be used to match multiple files.
See Also: Oracle Database Oracle Clusterware and Oracle Real Application Clusters Administration and Deployment Guide to learn about using RMAN in a RAC configuration |
Syntax Element | Description |
---|---|
FROM SCN = integer |
Specifies the beginning SCN for a sequence of archived redo log files. If you do not specify the UNTIL SCN parameter, RMAN will include all available log files beginning with SCN specified in the from SCN parameter. |
SCN BETWEEN integer AND integer |
Specifies a range of SCNs. SCN BETWEEN integer1 AND integer2 is exactly equivalent to FROM SCN integer1 UNTIL SCN integer2 . |
UNTIL SCN = integer |
Specifies the ending SCN for a sequence of archived redo log files. If you do not specify the FROM SCN parameter, then RMAN will start with the earliest available archived log.
If the database is open when you run |
FROM SEQUENCE integer |
Specifies the beginning log sequence number for a sequence of archived redo log files. If you do not specify the UNTIL SEQUENCE parameter, RMAN will include all available log files beginning with log sequence number specified in the FROM SEQUENCE parameter.
Note: You can specify all log sequence numbers in a thread by using the following syntax, where ... ARCHIVELOG FROM SEQUENCE 0 THREAD thread_number
|
SEQUENCE |
Specifies either a single log sequence number or a range of sequence numbers. If the database is open when you run BACKUP ARCHIVELOG , and if the SEQUENCE keyword is specified, then RMAN does not run ALTER SYSTEM ARCHIVE LOG CURRENT . |
integer |
Specifies a single log sequence number. |
BETWEEN integer AND integer |
Specifies a range of log sequence numbers. SEQUENCE BETWEEN integer1 AND integer2 is exactly equivalent to FROM SEQUENCE integer1 UNTIL SEQUENCE integer2 . |
UNTIL SEQUENCE = integer |
Specifies the terminating log sequence number for a sequence of archived redo log files. If you do not specify the FROM SEQUENCE parameter, RMAN uses the lowest available log sequence number to begin the sequence.
If the database is open when you run |
FROM TIME = 'date_string ' |
Specifies the beginning date for a sequence of archived redo log files. The clause specifies those logs that could be used in a recovery starting at the indicated time.
The time specified in the string must be formatted according to the Globalization Technology date format specification currently in effect, but can also be any SQL expression with the If you do not specify the Note: The See Also: Oracle Database Reference for information on how to use the |
TIME BETWEEN ' date_string ' AND 'date_string ' |
Specifies a range of times. Note that TIME BETWEEN ' date_string ' AND ' date_string ' is exactly equivalent to FROM TIME ' date_string ' UNTIL TIME ' date_string ' . |
UNTIL TIME = ' date_string ' |
Specifies the end date for a sequence of archived redo log files. The clause specifies those logs that could be used to recover to the indicated time.
The time specified in the string must be formatted according to the Globalization Technology date format specification currently in effect, but can also be any SQL expression with the If you do not specify the If the database is open when you run Note: The See Also: Oracle Database Reference for information on how to use the |
THREAD = integer |
Specifies the thread containing the archived redo log files you wish to include. You only need to specify this parameter when running the database in an Oracle Real Application Clusters (RAC) configuration.
|
Specifying Records by Completion Time: Example This example deletes all archived redo logs that were created more than two weeks ago:
DELETE ARCHIVELOG ALL COMPLETED BEFORE 'SYSDATE-14';
Specifying Records by Recovery Point-in-Time : Example This example backs up all logs that could be used to recover to a point one week ago:
BACKUP ARCHIVELOG UNTIL TIME 'SYSDATE-7';
Specifying Records by SCN: Example This example restores backup archived redo log files from tape that fall within a range of SCNs:
RESTORE ARCHIVELOG SCN BETWEEN 94097 AND 106245;
Specifying a Single Log Sequence Number: Example This example backs up only archived log 30 of thread 1 and then deletes it.
BACKUP ARCHIVELOG SEQUENCE 30 DELETE INPUT;
Specifying a Range of Records by Log Sequence Number: Example This example backs up all archived logs from sequence 431 to sequence 440 on thread 1 and deletes the archived logs after the backup is complete. If the backup fails, the logs are not deleted.
RUN { ALLOCATE CHANNEL dev1 DEVICE TYPE sbt; BACKUP ARCHIVELOG SEQUENCE BETWEEN 31 AND 40 THREAD 1 # delete original archived redo logs after backup completes DELETE INPUT; }
Specifying All Log Sequence Numbers in a Thread This example crosschecks all archived redo logs in thread 1
:
CROSSCHECK ARCHIVELOG FROM SEQUENCE 0 THREAD 1;