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.
For example; You can export or import only tables that start with “CRM_” as follows.
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.
If you want to export or import only views, use the following INCLUDE Clause.
If you want to export or import only Packages which names start with PKG, use the following INCLUDE Clause.
If you want to export or import only following schemas, use the following INCLUDE Clause.
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.
Do you want to learn Oracle Database for Beginners, then read the following articles.
2,382 views last month, 4 views today