Bewildering EXCLUDE of IMPDP / EXPDP

EXCLUDE can at times be very confusing and IMPDP keeps complaining on badly formed EXCLUDE. Here, we will take a look at how to construct IMPDP with EXCLUDE option included and try to exclude multiple database objects.

Scenario

A full database dump is given and we have to import a particular user to another database.c

For IMPDP to be successful, I've found that using parameter file plays a major role. So here, we will use the param file which contains all the necessary parameters, excluding the password.

Open file impdp.par and add the following lines.

DUMP_FILE=file1.dmp 
LOG_FILE=file1.log 
DIRECTORY=data_pump_dir 
SCHEMAS=schema1 
EXCLUDE=TABLE IN "('emp', 'dept')" 
REMAP_SCHEMA=schema1:schema2 
REMAP_TABLESPACE=ts1:ts2 
EXCLUDE=SYNONYM
$ impdp parfile=impdp.par
Comments