martes, 19 de julio de 2011

Switching Datafile Filenames After a Restore:

Example

Switching Datafile Filenames After a Restore: Example
This example allocates one disk device and one tape device to allow RMAN to restore from disk and tape.

RUN
{
ALLOCATE CHANNEL dev1 DEVICE TYPE DISK;
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";
}