Use the RMAN TRANSPORT TABLESPACE command to create transportable tablespace sets from RMAN backups instead of the live data files of the source database.
Using RMAN TRANSPORT TABLESPACE with a Past Time
In this example, the tablespaces for the transportable set are example
and tools
, the transportable set files are to be stored at /disk1/transport_dest
, and the transportable tablespaces are to be recovered to a time 15 minutes ago:
TRANSPORT TABLESPACE example, tools TABLESPACE DESTINATION '/disk1/transportdest' AUXILIARY DESTINATION '/disk1/auxdest' UNTIL TIME 'SYSDATE-15/1440';
Partial sample output follows:
Creating automatic instance, with SID='egnr' initialization parameters used for automatic instance: db_name=PROD compatible=11.0.0 db_block_size=8192 . . . starting up automatic instance PROD . . . executing Memory Script executing command: SET until clause Starting restore at 07-JUN-13 allocated channel: ORA_AUX_DISK_1 channel ORA_AUX_DISK_1: SID=44 device type=DISK channel ORA_AUX_DISK_1: starting datafile backup set restore channel ORA_AUX_DISK_1: restoring control file . . . output file name=/disk1/auxdest/cntrl_tspitr_PROD_egnr.f Finished restore at 07-JUN-13 sql statement: alter database mount clone database sql statement: alter system archive log current sql statement: begin dbms_backup_restore.AutoBackupFlag(FALSE); end; starting full resync of recovery catalog full resync complete . . . executing Memory Script . . . Starting restore at 07-JUN-13 using channel ORA_AUX_DISK_1 channel ORA_AUX_DISK_1: starting datafile backup set restore channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set channel ORA_AUX_DISK_1: restoring datafile 00001 to /disk1/auxdest/TSPITR_PROD_EGNR/datafile/o1_mf_system_%u_.dbf datafile 1 switched to datafile copy . . . starting media recovery . . . Finished recover at 07-JUN-13 database opened . . . executing Memory Script . . . sql statement: alter tablespace EXAMPLE read only Removing automatic instance shutting down automatic instance Oracle instance shut down Automatic instance removed auxiliary instance file /disk1/auxdest/cntrl_tspitr_PROD_egnr.f deleted . . .
Using TRANSPORT TABLESPACE with Customized File Locations
This example illustrates the use of the optional arguments that control the locations of Data Pump-related files such as the dump file. The DATAPUMP DIRECTORY
must refer to an object that exists in the target database. Use the CREATE DIRECTORY
SQL statement to create a directory object.
TRANSPORT TABLESPACE example TABLESPACE DESTINATION '/disk1/transportdest' AUXILIARY DESTINATION '/disk1/auxdest' DATAPUMP DIRECTORY mypumpdir DUMP FILE 'mydumpfile.dmp' IMPORT SCRIPT 'myimportscript.sql' EXPORT LOG 'myexportlog.log';
Also See: