Monday, September 26, 2011

REMAP_DATFILE parameter in datapump


You are moving some tables from another database and the tablespace in which these tables exist is also new in the target database. Importing those tables will create the tablespaces in the target database too; but here is a small problem – the filesystems are different. For example, the datafile for tablespace was “/u01/data1.dbf” but the target database does not have a mount point called /u01; instead it has “/u02”. Ordinarily you would have to create the tablespace manually and then import the table into the tablespace.

Data Pump eliminates the extra step in one elegant motion. All you have to do is use the REMAP_DATAFILE option as follows:

$ impdp remap_datafile=‘/u01/data1.dbf':'/u02/data1.dbf'

This creates the same datafile as /u02/data1.dbf. you can use this option to recreate the test data even across different platforms. For instance, the following option in the option converts datafiles from a unix to Windows format.

remap_datafile='/u01/data1.dbf':'c:\oradata\data1.dbf'

Enjoy:-)

1 comment:

Oracle DBA said...

few more parameters here :

http://chandu208.blogspot.com/2011/09/data-pump-scenarios.html