Oracle9i Recovery Manager Reference Release 1 (9.0.1) Part Number A90136-02 |
|
RMAN Commands , 39 of 60
recoverObject::=
recoverOptionList::=
To apply redo logs or incremental backups to one or more restored datafiles in order to update them to a specified time.
RMAN uses online redo records and restores backup sets of archived redo logs as needed to perform the media recovery. RMAN first looks for the original archived logs or image copies, and if none are available, then it restores backups.
If RMAN has a choice between applying an incremental backup or applying redo, then it always chooses the incremental backup. If overlapping levels of incremental backup are available, then RMAN automatically chooses the one covering the longest period of time. Note that RMAN can apply incremental backups to restored files that were not created as part of an incremental backup.
ALLOCATE CHANNEL
command must precede RECOVER
unless you do not need to restore archived redo log or incremental backups.
DISK
channel. If incremental backups need to be restored during recovery, however, then you must either use configured channels or manually allocate channels of the same type that created these backups.
SET
UNTIL
command before both the RESTORE
and RECOVER
command. If you specify a SET
UNTIL
command after a
RESTORE
and before a RECOVER
, then you may not be able to perform media recovery on the database to the time required because the restored files may have time stamps later than the specified time.
RECOVER
DATABASE
command does not recover any files that are offline normal or read-only at the point in time to which the files are being recovered. RMAN omits offline normal files with no further checking. If CHECK READONLY
is specified, then RMAN checks each read-only file on disk to ensure that it is already current at the desired point in time. If CHECK READONLY
is not specified, then RMAN omits read-only files.
RESETLOGS
option after incomplete recovery or recovery with a backup control file.
CONFIGURE
DEVICE
TYPE
command (except for DISK
, which is preconfigured) before specifying the DEVICE
TYPE
option.
RECOVER
with the DEVICE
TYPE
option.
Allocates automatic channels for the specified device type only. For example, if you configure automatic disk and tape channels, and issue See Also: "deviceSpecifier" |
||
|
Specifies that the entire database is to be recovered. Unless you specify an untilClause, RMAN performs complete recovery. |
|
|
Specifies a noncurrent time, SCN, or log sequence number for termination of the See Also: "untilClause" |
|
|
|
Lists tablespaces that should not be recovered, which is useful for avoiding recovery of tablespaces containing only temporary data or for postponing recovery of some tablespaces. The
If you perform incomplete recovery, then |
|
Specifies tablespaces by tablespace name. |
|
|
Specifies a list of one or more datafiles to recover. Specify datafiles by either filename (by using a quoted string) or absolute datafile number (by using an integer). If you are using the control file as the exclusive repository for RMAN metadata, then the filename must be the name of the datafile as known in the control file.
If you are using a recovery catalog, then the filename of the datafile must be the most recent name recorded in the catalog. For example, assume that a datafile was renamed in the control file. The database then crashes before you can resynchronize the catalog. Specify the old name of the datafile in the See Also: "datafileSpec" |
|
recoverOptionList |
Specifies various recovery options. |
|
|
|
Deletes archived logs restored from backups or copies that are no longer needed. RMAN does not delete archived logs that were already on disk before the |
|
|
Checks the headers of read-only files to ensure that they are current before omitting them from the recovery. |
|
|
Suppresses the application of redo logs--only incremental backups are applied. This option is intended for recovery of
Note: Incremental backups of |
|
|
Tests data and index blocks that pass physical corruption checks for logical corruption, for example, corruption of a row piece or index entry. If RMAN finds logical corruption, it logs the block in the
Provided the sum of physical and logical corruptions detected for a file remain below its
Note: The |
|
|
Specifies the tag for an incremental backup to be used during recovery. If the tagged backup does not contain all the necessary incrementals for recovery, then RMAN uses logs or incremental backups as needed from whatever is available. |
|
|
Specifies the tag for an archived log backup to be used during recovery. If the tagged backup does not contain all the necessary logs for recovery, RMAN uses logs or incremental backups as needed from whatever is available. |
The following example takes tablespace tbs_1
offline, uses automatic channels to restore and recover it (deleting the logs that it restored from tape), then brings it back online:
SQL "ALTER TABLESPACE tbs_1 OFFLINE IMMEDIATE"; RESTORE TABLESPACE tbs_1; RECOVER TABLESPACE tbs_1 DELETE ARCHIVELOG; SQL "ALTER TABLESPACE tbs_1 ONLINE";
The following example uses the preconfigured disk channel and manually allocates one media management channel to use datafile copies on disk and backups on tape, and restores one of the datafiles in tablespace tbs_1
to a different location:
RUN { ALLOCATE CHANNEL dev2 DEVICE TYPE sbt; SQL "ALTER TABLESPACE tbs_1 OFFLINE IMMEDIATE"; SET NEWNAME FOR DATAFILE 'disk7/oracle/tbs11.f' TO 'disk9/oracle/tbs11.f'; RESTORE TABLESPACE tbs_1; SWITCH DATAFILE ALL; RECOVER TABLESPACE tbs_1; SQL "ALTER TABLESPACE tbs_1 ONLINE"; }
Assume that both the database and archived redo log 1234 were lost due to a disk crash. Because you do not have incremental backups, you need to recover the database by using available archived redo logs. You do not need to restore tablespace readonly1
because it has not changed since log 1234.
RUN { SET UNTIL SEQUENCE 1234 THREAD 1; # Recover database until log sequence 1234 RESTORE CONTROLFILE TO '/vobs/oracle/dbs/cf1.f' ; # Because you specified a restore destination, manually replicate the control file. # RMAN replicates automatically when no destination is specified. REPLICATE CONTROLFILE FROM '/vobs/oracle/dbs/cf1.f'; ALTER DATABASE MOUNT; RESTORE DATABASE SKIP TABLESPACE temp1, readonly1; RECOVER DATABASE SKIP FOREVER TABLESPACE temp1; ALTER DATABASE OPEN RESETLOGS; SQL "DROP TABLESPACE temp1"; SQL "CREATE TABLESPACE temp1 DATAFILE '/vobs/oracle/dbs/temp1.f' SIZE 10M TEMPORARY"; }
|
Copyright © 1996-2001, Oracle Corporation. All Rights Reserved. |
|