QDT: Escape from Alcatraz

February 3, 2012 at 4:32 pm | Posted in Oracle Developement, Oracle Tools, PL/SQL | Leave a comment
Tags: , , ,

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:

expdp system/password@db directory=data_pump_dir dumpfile=mydata.dmp logfile=mydata.log schema=scott exclude=table:"in ('BONUS','(SALGRADE)'

In Unix/Linux you’ll have to escape the quotes and parenthesis:

expdp system/password@db directory=data_pump_dir dumpfile=mydata.dmp logfile=mydata.log schema=scott exclude=table:\"in \(\'BONUS\',\'\(SALGRADE\)\'
Advertisements

Leave a Comment »

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Blog at WordPress.com.
Entries and comments feeds.

%d bloggers like this: