I will explain Include option in EXPDP and IMPDP in Oracle Datapump in this post.
If you want to learn how to Exclude schema or Table in Export import, you can read the following post.
Include option in Oracle Datapump
If you want to export or import only specified object, you should use the INCLUDE option in expdp or impdp.
INCLUDE option syntax is as follows.
INCLUDE=object_type:[name_clause],object_type:[name_clause]
For example; You can export or import only tables that start with “CRM_” as follows.
INCLUDE=TABLE:"LIKE 'CRM%'"
You can export of tables that start with “CRM” of MSDB schema as follows.
expdp \"/ as sysdba\" directory=DATA_PUMP_DIR dumpfile=SchemaBackup%U.dmp schemas=MSDB logfile=SchemaBackup.log parallel=64 cluster=n INCLUDE=TABLE:"LIKE 'CRM%'"
If you want to export or import only tables, use the following INCLUDE Clause.
INCLUDE=TABLE
If you want to export or import only views, use the following INCLUDE Clause.
INCLUDE=VIEW
If you want to export or import only Packages which names start with PKG, use the following INCLUDE Clause.
INCLUDE=PACKAGE:"LIKE '%PKG'"
If you want to export or import only following schemas, use the following INCLUDE Clause.
INCLUDE=SCHEMA:"IN ('HR','SCOTT')"
Include Table & Index in Oracle
If you want to export of full database but only tables and Indexes, you can use the following include clause.
INCLUDE=TABLE,INDEX
expdp \"/ as sysdba\" directory=DATA_PUMP_DIR dumpfile=FullDatabase%U.dmp full=y logfile=FullDatabase.log parallel=64 cluster=n INCLUDE=TABLE,INDEX
You can use the SELECT subquery in the INCLUDE clause as follows.
INCLUDE=TABLE:\"IN \(SELECT table_name FROM dba_tables WHERE \ owner=\'SCOTT\' AND object_type=\'TABLE\'\)\"
You can read the following post to learn more details about Datapump Export.
Oracle Data Pump – Export Import ( Expdp Impdp ) Tutorial with Examples-4
Do you want to learn Oracle Database for Beginners, then read the following articles.
Oracle Tutorial | Oracle Database Tutorials for Beginners ( Junior Oracle DBA )