Wednesday, February 23, 2011

Expdp Options


expdp system/******** schemas=SCOTT directory=SCOTT_DUMP dumpfile=scott.dmp logfile=scott.log EXCLUDE=TABLE:\"LIKE \'EMP%\'\", TABLE:\"LIKE \'%ABC%\'\"

if you just type EXCLUDE=TABLE:"LIKE 'EMP%'", TABLE:"LIKE '%ABC%'":

you will get the following error.

ORA-39001: invalid argument value
ORA-39071: Value for EXCLUDE is badly formed.
ORA-00911: invalid character

you need to include escape characters in the statement, e.g.:
EXCLUDE=TABLE:\"LIKE \'EMP%\'\", TABLE:\"LIKE \'%ABC%\'\" ,
this would exclude tables starting with EMP and any tables having ABC in their table name.

Using the NOT IN OPERATOR
EXCLUDE=TABLE:\"NOT IN \(\'ABC\',\'XYZ\'\)\"

Using the IN OPERATOR
EXCLUDE=TABLE:\"IN \(\'ABC\',\'XYZ\'\)\"