QDT: Escape from Alcatraz
Quick Datapump Trick
Using the expdp/impdp datapump utilities on Unix/Linux can be a bit tricky when it comes to formulating the EXCLUDE or INCLUDE parameters. Let’s say I want to export a schema but exclude two tables (BONUS,SALGRADE). The expdp command would look something like this in Windows:
[sourcecode]expdp system/password@db directory=data_pump_dir dumpfile=mydata.dmp logfile=mydata.log schema=scott exclude=table:"in (‘BONUS’,'(SALGRADE)'[/sourcecode]
In Unix/Linux you’ll have to escape the quotes and parenthesis:
[sourcecode]expdp system/password@db directory=data_pump_dir dumpfile=mydata.dmp logfile=mydata.log schema=scott exclude=table:\"in \(\’BONUS\’,\’\(SALGRADE\)\'[/sourcecode]