Expdp utility helps to take logical backups a particular object,schema or the complete database.
For taking expdp backup, we need to create one directory at database level as below.
SQL> create directory EXP_DIR as ‘/home/oracle/EXP_DIR’;
Directory created.
Basic syntax is expdp username/password dumpfile= logfile= directory=<directory_name(EXP_DIR)>
Other keywords can be used according to our requirement.
Export backup of complete database:
expdp system/oracle@orcl dumpfile=fulldatabase.dmp logfile=fulldatabase.log directory=EXP_DIR full=y
Export backup of schemas:
expdp system/oracle@orcl dumpfile=schema.dmp logfile=exp_schema.log directory=EXP_DIR schemas=PRODCLASS,DBACLASS
Take export backup of tables:
[oracle@localhost EXP_DIR]$ expdp system/oracle@orcl dumpfile=tables1.dmp logfile=exp_tables.log directory=EXP_DIR tables=PRODCLASS.TEST
Take export backup using PARALLEL option:
We can make the export job faster by using parallel option in EXPDP.
expdp system/oracle@orcl dumpfile=tables1_%U.dmp logfile=exp_tables.log directory=EXP_DIR tables=PRODCLASS.TEST parallel=4
Export of table partitions:
expdp system/oracle@orcl dumpfile=table_part.dmp logfile=table_part.log directory=EXP_DIR tables=PRODCLASS.TEST:TEST_201501
Exclude and Include parameter in expdp:
For taking export of specific object_types of a schema(suppose only tables)
expdp system/oracle@orcl dumpfile=table_only.dmp logfile=table_only.log directory=EXP_DIR schemas=DBACLASS include=TABLE
For taking export of objects excepts specific object_types of a schema(suppose index)
expdp system/oracle@orcl dumpfile=table_only.dmp logfile=table_only.log directory=EXP_DIR schemas=DBACLASS exclude=INDEX