Exclude Tables from Oracle Exports

For modern Oracle environments, use Data Pump rather than the legacy exp utility when you need to exclude tables or other object types from an export.

Data Pump EXCLUDE

expdp system@database \
  schemas=SCOTT \
  directory=DATA_PUMP_DIR \
  dumpfile=scott.dmp \
  logfile=scott.log \
  exclude=TABLE:"IN ('TABLE1','TABLE2')"

The exact quoting can vary by shell, so parameter files are often easier for complex filters.

Legacy exp environments

The original exp utility did not provide the same flexible EXCLUDE support. Older workarounds built an explicit TABLE list and passed it through a parameter file.

That approach only exports the listed tables and can omit procedures, views, sequences, and other schema objects, so it should not be mistaken for a full schema backup.

For new procedures, prefer expdp/impdp and document the filters used so the export can be reproduced.

Leave a Comment