Oracle9i Recovery Manager Reference Release 1 (9.0.1) Part Number A90136-02 |
|
RMAN Commands , 57 of 60
To specify that a datafile copy is now the current datafile, that is, the datafile pointed to by the control file. A switch is equivalent to using the ALTER
DATABASE
RENAME
FILE
statement: Oracle renames the files in the control file but does not actually rename them on the operating system. Note that this command deletes the records for the datafile copy from the recovery catalog and updates the control file records to status DELETED
.
SWITCH
within the braces of a
RUN
command.
SWITCH
adds the datafile to the control file if it is not there already. You can only add datafiles through SWITCH
that were created after the backup control file was created.
This example allocates one disk device and one tape device to allow RMAN to restore both from disk and tape.
RUN { ALLOCATE CHANNEL dev1 DEVICE TYPE DISK RATE 1000; 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"; }
|
Copyright © 1996-2001, Oracle Corporation. All Rights Reserved. |
|