In this article I will share an example about data pump usage.
First we start with export.
EXPORT:
1 2 | SQL> CREATE OR REPLACE DIRECTORY test_dir AS '/oracle/oradata/'; SQL> GRANT READ, WRITE ON DIRECTORY test_dir TO system; |
1 | $ expdp system/oracle full=y directory=test_dir parallel=4 dumpfile=test%U.dmp logfile=exp01.log |
or
1 | $ nohup expdp system/oracle full=y directory=test_dir parallel=4 dumpfile=test%U.dmp logfile=exp01.log & |
or
1 | $ expdp system/oracle schemas=SCOTT directory=test_dir parallel=2 dumpfile=test%U.dmp logfile=exp01.log |
or
1 | $ expdp system/oracle tables=emp,dept directory=test_dir parallel=2 dumpfile=test%U.dmp logfile=exp01.log |
Then we continue with import.
IMPORT:
If not previously created:
1 2 | SQL> CREATE OR REPLACE DIRECTORY test_dir AS '/oracle/oradata/'; SQL> GRANT READ, WRITE ON DIRECTORY test_dir TO system; |
1 | $ impdp system/oracle123 schemas=XXX directory=test_dir parallel=4 cluster=n dumpfile=test%U.dmp logfile=imp01.log |