Oracle Data Pump (EXPDP) provides powerful options to control what gets exported using INCLUDE and EXCLUDE.
In this blog, we’ll cover:
- What INCLUDE and EXCLUDE are
- Correct syntax (command line + parfile)
- Single and multiple object filtering
- Common errors and fixes
- Best practices used by DBAs
What is INCLUDE and EXCLUDE?
- INCLUDE → Export only selected objects
- EXCLUDE → Export everything except selected objects
👉 These options work at metadata level filtering
Basic Export
expdp hr@pdb2 directory=dbbackup dumpfile=full_hr.dmp schemas=hr logfile=full.logoracle@localhost ~]$ expdp hr@pdb2 directory=dbbackup dumpfile=full_hr.dmp schemas=hr logfile=full.logExport: Release 23.26.0.0.0 - Production on Wed Apr 22 13:30:46 2026Version 23.26.0.0.0Copyright (c) 1982, 2025, Oracle and/or its affiliates. All rights reserved.Password: Connected to: Oracle AI Database 26ai Free Release 23.26.0.0.0 - Develop, Learn, and Run for FreeStarting "HR"."SYS_EXPORT_SCHEMA_01": hr/********@pdb2 directory=dbbackup dumpfile=full_hr.dmp schemas=hr logfile=full.log Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATAProcessing object type SCHEMA_EXPORT/TABLE/INDEX/STATISTICS/INDEX_STATISTICSProcessing object type SCHEMA_EXPORT/TABLE/STATISTICS/TABLE_STATISTICSProcessing object type SCHEMA_EXPORT/PRE_SCHEMA/PROCACT_SCHEMA/LOGREPProcessing object type SCHEMA_EXPORT/SEQUENCE/SEQUENCEProcessing object type SCHEMA_EXPORT/TABLE/TABLEProcessing object type SCHEMA_EXPORT/TABLE/COMMENTProcessing object type SCHEMA_EXPORT/PROCEDURE/PROCEDUREProcessing object type SCHEMA_EXPORT/PROCEDURE/ALTER_PROCEDUREProcessing object type SCHEMA_EXPORT/VIEW/VIEWProcessing object type SCHEMA_EXPORT/TABLE/INDEX/INDEXProcessing object type SCHEMA_EXPORT/TABLE/CONSTRAINT/CONSTRAINTProcessing object type SCHEMA_EXPORT/TABLE/CONSTRAINT/REF_CONSTRAINTProcessing object type SCHEMA_EXPORT/TABLE/TRIGGER. . exported "HR"."EMP" 17.3 KB 107 rows. . exported "HR"."EMPLOYEES" 17.3 KB 107 rows. . exported "HR"."EMP_BACKUP" 17.3 KB 107 rows. . exported "HR"."LOCATIONS" 8.6 KB 23 rows. . exported "HR"."JOB_HISTORY" 7.3 KB 10 rows. . exported "HR"."JOBS" 7.2 KB 19 rows. . exported "HR"."DEPARTMENTS" 7.2 KB 27 rows. . exported "HR"."COUNTRIES" 6.5 KB 25 rows. . exported "HR"."REGIONS" 5.6 KB 5 rowsMaster table "HR"."SYS_EXPORT_SCHEMA_01" successfully loaded/unloaded******************************************************************************Dump file set for HR.SYS_EXPORT_SCHEMA_01 is: /home/oracle/dbbackup/full_hr.dmpJob "HR"."SYS_EXPORT_SCHEMA_01" successfully completed at Wed Apr 22 13:32:47 2026 elapsed 0 00:01:55
EXCLUDE CASES (All Working Examples)
Exclude Single Table
expdp hr@pdb2 \directory=dbbackup \dumpfile=exclude_emp.dmp \schemas=hr \logfile=exclude_emp.log \exclude=TABLE:\"=\'EMPLOYEES\'\"
OUTPUT:
[oracle@localhost ~]$ expdp hr@pdb2 \directory=dbbackup \dumpfile=exclude_emp.dmp \schemas=hr \logfile=exclude_emp.log \exclude=TABLE:\"=\'EMPLOYEES\'\"Export: Release 23.26.0.0.0 - Production on Wed Apr 22 13:33:09 2026Version 23.26.0.0.0Copyright (c) 1982, 2025, Oracle and/or its affiliates. All rights reserved.Password: Connected to: Oracle AI Database 26ai Free Release 23.26.0.0.0 - Develop, Learn, and Run for FreeStarting "HR"."SYS_EXPORT_SCHEMA_01": hr/********@pdb2 directory=dbbackup dumpfile=exclude_emp.dmp schemas=hr logfile=exclude_emp.log exclude=TABLE:"='EMPLOYEES'" Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATAProcessing object type SCHEMA_EXPORT/TABLE/INDEX/STATISTICS/INDEX_STATISTICSProcessing object type SCHEMA_EXPORT/TABLE/STATISTICS/TABLE_STATISTICSProcessing object type SCHEMA_EXPORT/PRE_SCHEMA/PROCACT_SCHEMA/LOGREPProcessing object type SCHEMA_EXPORT/SEQUENCE/SEQUENCEProcessing object type SCHEMA_EXPORT/TABLE/TABLEProcessing object type SCHEMA_EXPORT/TABLE/COMMENTProcessing object type SCHEMA_EXPORT/PROCEDURE/PROCEDUREProcessing object type SCHEMA_EXPORT/PROCEDURE/ALTER_PROCEDUREProcessing object type SCHEMA_EXPORT/VIEW/VIEWProcessing object type SCHEMA_EXPORT/TABLE/INDEX/INDEXProcessing object type SCHEMA_EXPORT/TABLE/CONSTRAINT/CONSTRAINTProcessing object type SCHEMA_EXPORT/TABLE/CONSTRAINT/REF_CONSTRAINT. . exported "HR"."EMP" 17.3 KB 107 rows. . exported "HR"."EMP_BACKUP" 17.3 KB 107 rows. . exported "HR"."LOCATIONS" 8.6 KB 23 rows. . exported "HR"."JOB_HISTORY" 7.3 KB 10 rows. . exported "HR"."JOBS" 7.2 KB 19 rows. . exported "HR"."DEPARTMENTS" 7.2 KB 27 rows. . exported "HR"."COUNTRIES" 6.5 KB 25 rows. . exported "HR"."REGIONS" 5.6 KB 5 rowsMaster table "HR"."SYS_EXPORT_SCHEMA_01" successfully loaded/unloaded******************************************************************************Dump file set for HR.SYS_EXPORT_SCHEMA_01 is: /home/oracle/dbbackup/exclude_emp.dmpJob "HR"."SYS_EXPORT_SCHEMA_01" successfully completed at Wed Apr 22 13:35:07 2026 elapsed 0 00:01:51
Exclude Multiple Tables
expdp hr@pdb2 \directory=dbbackup \dumpfile=exclude_multi.dmp \schemas=hr \logfile=exclude_multi.log \exclude=TABLE:\"IN \(\'EMPLOYEES\',\'DEPARTMENTS\'\)\"
OUTPUT:
[oracle@localhost ~]$ expdp hr@pdb2 \directory=dbbackup \dumpfile=exclude_multi.dmp \schemas=hr \logfile=exclude_multi.log \exclude=TABLE:\"IN \(\'EMPLOYEES\',\'DEPARTMENTS\'\)\"Export: Release 23.26.0.0.0 - Production on Wed Apr 22 13:37:09 2026Version 23.26.0.0.0Copyright (c) 1982, 2025, Oracle and/or its affiliates. All rights reserved.Password: Connected to: Oracle AI Database 26ai Free Release 23.26.0.0.0 - Develop, Learn, and Run for FreeStarting "HR"."SYS_EXPORT_SCHEMA_01": hr/********@pdb2 directory=dbbackup dumpfile=exclude_multi.dmp schemas=hr logfile=exclude_multi.log exclude=TABLE:"IN ('EMPLOYEES','DEPARTMENTS')" Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATAProcessing object type SCHEMA_EXPORT/TABLE/INDEX/STATISTICS/INDEX_STATISTICSProcessing object type SCHEMA_EXPORT/TABLE/STATISTICS/TABLE_STATISTICSProcessing object type SCHEMA_EXPORT/PRE_SCHEMA/PROCACT_SCHEMA/LOGREPProcessing object type SCHEMA_EXPORT/SEQUENCE/SEQUENCEProcessing object type SCHEMA_EXPORT/TABLE/TABLEProcessing object type SCHEMA_EXPORT/TABLE/COMMENTProcessing object type SCHEMA_EXPORT/PROCEDURE/PROCEDUREProcessing object type SCHEMA_EXPORT/PROCEDURE/ALTER_PROCEDUREProcessing object type SCHEMA_EXPORT/VIEW/VIEWProcessing object type SCHEMA_EXPORT/TABLE/INDEX/INDEXProcessing object type SCHEMA_EXPORT/TABLE/CONSTRAINT/CONSTRAINTProcessing object type SCHEMA_EXPORT/TABLE/CONSTRAINT/REF_CONSTRAINT. . exported "HR"."EMP" 17.3 KB 107 rows. . exported "HR"."EMP_BACKUP" 17.3 KB 107 rows. . exported "HR"."LOCATIONS" 8.6 KB 23 rows. . exported "HR"."JOB_HISTORY" 7.3 KB 10 rows. . exported "HR"."JOBS" 7.2 KB 19 rows. . exported "HR"."COUNTRIES" 6.5 KB 25 rows. . exported "HR"."REGIONS" 5.6 KB 5 rowsMaster table "HR"."SYS_EXPORT_SCHEMA_01" successfully loaded/unloaded******************************************************************************Dump file set for HR.SYS_EXPORT_SCHEMA_01 is: /home/oracle/dbbackup/exclude_multi.dmpJob "HR"."SYS_EXPORT_SCHEMA_01" successfully completed at Wed Apr 22 13:39:27 2026 elapsed 0 00:02:13
Exclude Tables Using LIKE
expdp hr@pdb2 \directory=dbbackup \dumpfile=exclude_like.dmp \schemas=hr \logfile=exclude_like.log \exclude=TABLE:\"LIKE 'EMP%'\"
OUTPUT
[oracle@localhost ~]$ expdp hr@pdb2 directory=dbbackup dumpfile=exclude_like.dmp schemas=hr logfile=exclude_like.log exclude=TABLE:\"LIKE \'EMP%\'\"Export: Release 23.26.0.0.0 - Production on Wed Apr 22 14:01:35 2026Version 23.26.0.0.0Copyright (c) 1982, 2025, Oracle and/or its affiliates. All rights reserved.Password: Connected to: Oracle AI Database 26ai Free Release 23.26.0.0.0 - Develop, Learn, and Run for FreeStarting "HR"."SYS_EXPORT_SCHEMA_01": hr/********@pdb2 directory=dbbackup dumpfile=exclude_like.dmp schemas=hr logfile=exclude_like.log exclude=TABLE:"LIKE 'EMP%'" Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATAProcessing object type SCHEMA_EXPORT/TABLE/INDEX/STATISTICS/INDEX_STATISTICSProcessing object type SCHEMA_EXPORT/TABLE/STATISTICS/TABLE_STATISTICSProcessing object type SCHEMA_EXPORT/PRE_SCHEMA/PROCACT_SCHEMA/LOGREPProcessing object type SCHEMA_EXPORT/SEQUENCE/SEQUENCEProcessing object type SCHEMA_EXPORT/TABLE/TABLEProcessing object type SCHEMA_EXPORT/TABLE/COMMENTProcessing object type SCHEMA_EXPORT/PROCEDURE/PROCEDUREProcessing object type SCHEMA_EXPORT/PROCEDURE/ALTER_PROCEDUREProcessing object type SCHEMA_EXPORT/VIEW/VIEWProcessing object type SCHEMA_EXPORT/TABLE/INDEX/INDEXProcessing object type SCHEMA_EXPORT/TABLE/CONSTRAINT/CONSTRAINTProcessing object type SCHEMA_EXPORT/TABLE/CONSTRAINT/REF_CONSTRAINT. . exported "HR"."LOCATIONS" 8.6 KB 23 rows. . exported "HR"."JOB_HISTORY" 7.3 KB 10 rows. . exported "HR"."JOBS" 7.2 KB 19 rows. . exported "HR"."DEPARTMENTS" 7.2 KB 27 rows. . exported "HR"."COUNTRIES" 6.5 KB 25 rows. . exported "HR"."REGIONS" 5.6 KB 5 rowsMaster table "HR"."SYS_EXPORT_SCHEMA_01" successfully loaded/unloaded******************************************************************************Dump file set for HR.SYS_EXPORT_SCHEMA_01 is: /home/oracle/dbbackup/exclude_like.dmpJob "HR"."SYS_EXPORT_SCHEMA_01" successfully completed at Wed Apr 22 14:31:38 2026 elapsed 0 00:29:57
Exclude Indexes
expdp hr@pdb2 \directory=dbbackup \dumpfile=no_index.dmp \schemas=hr \logfile=no_index.log \exclude=INDEX
OUTPUT:
[oracle@localhost ~]$ expdp hr@pdb2 \directory=dbbackup \dumpfile=no_index.dmp \schemas=hr \logfile=no_index.log \exclude=INDEXExport: Release 23.26.0.0.0 - Production on Wed Apr 22 13:39:43 2026Version 23.26.0.0.0Copyright (c) 1982, 2025, Oracle and/or its affiliates. All rights reserved.Password: Connected to: Oracle AI Database 26ai Free Release 23.26.0.0.0 - Develop, Learn, and Run for FreeStarting "HR"."SYS_EXPORT_SCHEMA_01": hr/********@pdb2 directory=dbbackup dumpfile=no_index.dmp schemas=hr logfile=no_index.log exclude=INDEX Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATAProcessing object type SCHEMA_EXPORT/TABLE/STATISTICS/TABLE_STATISTICSProcessing object type SCHEMA_EXPORT/PRE_SCHEMA/PROCACT_SCHEMA/LOGREPProcessing object type SCHEMA_EXPORT/SEQUENCE/SEQUENCEProcessing object type SCHEMA_EXPORT/TABLE/TABLEProcessing object type SCHEMA_EXPORT/TABLE/COMMENTProcessing object type SCHEMA_EXPORT/PROCEDURE/PROCEDUREProcessing object type SCHEMA_EXPORT/PROCEDURE/ALTER_PROCEDUREProcessing object type SCHEMA_EXPORT/VIEW/VIEWProcessing object type SCHEMA_EXPORT/TABLE/CONSTRAINT/CONSTRAINTProcessing object type SCHEMA_EXPORT/TABLE/CONSTRAINT/REF_CONSTRAINTProcessing object type SCHEMA_EXPORT/TABLE/TRIGGER. . exported "HR"."EMP" 17.3 KB 107 rows. . exported "HR"."EMPLOYEES" 17.3 KB 107 rows. . exported "HR"."EMP_BACKUP" 17.3 KB 107 rows. . exported "HR"."LOCATIONS" 8.6 KB 23 rows. . exported "HR"."JOB_HISTORY" 7.3 KB 10 rows. . exported "HR"."JOBS" 7.2 KB 19 rows. . exported "HR"."DEPARTMENTS" 7.2 KB 27 rows. . exported "HR"."COUNTRIES" 6.5 KB 25 rows. . exported "HR"."REGIONS" 5.6 KB 5 rowsMaster table "HR"."SYS_EXPORT_SCHEMA_01" successfully loaded/unloaded******************************************************************************Dump file set for HR.SYS_EXPORT_SCHEMA_01 is: /home/oracle/dbbackup/no_index.dmpJob "HR"."SYS_EXPORT_SCHEMA_01" successfully completed at Wed Apr 22 13:42:00 2026 elapsed 0 00:02:12
Include Only Tables
expdp hr@pdb2 \directory=dbbackup \dumpfile=only_tables.dmp \schemas=hr \logfile=only_tables.log \include=TABLE
Include Specific Table
expdp hr@pdb2 \directory=dbbackup \dumpfile=only_emp.dmp \schemas=hr \logfile=only_emp.log \include=TABLE:\"=\'EMPLOYEES\'\"
Include Only Indexes
expdp hr@pdb2 \directory=dbbackup \dumpfile=index_only.dmp \schemas=hr \logfile=index_only.log \include=INDEX
Include Procedures Only
expdp hr@pdb2 \directory=dbbackup \dumpfile=proc_only.dmp \schemas=hr \logfile=proc_only.log \include=PROCEDURE
Example of include:
[oracle@localhost ~]$ expdp hr@pdb2 directory=dbbackup dumpfile=only_emp.dmp schemas=hr logfile=only_emp.log include=TABLE:\"=\'EMPLOYEES\'\"Export: Release 23.26.0.0.0 - Production on Wed Apr 22 14:02:50 2026Version 23.26.0.0.0Copyright (c) 1982, 2025, Oracle and/or its affiliates. All rights reserved.Password: Connected to: Oracle AI Database 26ai Free Release 23.26.0.0.0 - Develop, Learn, and Run for FreeStarting "HR"."SYS_EXPORT_SCHEMA_02": hr/********@pdb2 directory=dbbackup dumpfile=only_emp.dmp schemas=hr logfile=only_emp.log include=TABLE:"='EMPLOYEES'" Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATAProcessing object type SCHEMA_EXPORT/TABLE/INDEX/STATISTICS/INDEX_STATISTICSProcessing object type SCHEMA_EXPORT/TABLE/STATISTICS/TABLE_STATISTICSProcessing object type SCHEMA_EXPORT/TABLE/TABLEProcessing object type SCHEMA_EXPORT/TABLE/COMMENTProcessing object type SCHEMA_EXPORT/TABLE/INDEX/INDEXProcessing object type SCHEMA_EXPORT/TABLE/CONSTRAINT/CONSTRAINTProcessing object type SCHEMA_EXPORT/TABLE/CONSTRAINT/REF_CONSTRAINTProcessing object type SCHEMA_EXPORT/TABLE/TRIGGER. . exported "HR"."EMPLOYEES" 17.3 KB 107 rowsMaster table "HR"."SYS_EXPORT_SCHEMA_02" successfully loaded/unloaded******************************************************************************Dump file set for HR.SYS_EXPORT_SCHEMA_02 is: /home/oracle/dbbackup/only_emp.dmpJob "HR"."SYS_EXPORT_SCHEMA_02" successfully completed at Wed Apr 22 14:04:05 2026 elapsed 0 00:01:09