If your export size volume is huge than you may need to split export files instead of single FS. In this case, We need to use the multiple directories feature of EXPDP utility.

By using this feature, We can create multiple dump files in multiple directories and distribute our logical export to different directories on the operating system.

In my case my db version in 11.2.0.4 and my os is linux 6

So here is the demo:

1. Create a related folder on os. Consider two directories named export_folder1 and export_folder2

gunes@veridata# mkdir -p /u01/export_folder1
gunes@veridata# mkdir -p /u02/export_folder2

2. Create 2 directories from sqlplus

SQL > create or replace directory EXPDP1 as '/u01/export_folder1';

Directory created.
SQL > create or replace directory EXPDP2 as '/u02/export_folder2';

Directory created.
3. Check the directories
SQL > select * from dba_directories;

OWNER                          DIRECTORY_NAME      DIRECTORY_PATH
-------------------------    -------------------  --------------------
SYS                               EXPDP1           /u01/export_folder1
SYS                               EXPDP2           /u02/export_folder2

Now take logical backup using multiple directories.

gunes@veridata# expdp \'/ as sysdba\' dumpfile=EXPDP1:expdp_to_path1_%U.dmp,EXPDP2:expdp_to_path2_%U.dmp compression=all parallel=2 schema=XXX

Let us check multiple dump files will be created or not.

gunes@veridata# pwd
/u01/export_folder1
gunes@veridata# pwdls -ltr
-rw-r----- 1 oracle oinstall 5420000 Oct 03 02:34 expdp_datapump_01.dmp
-rw-r----- 1 oracle oinstall 420000 Oct 03 02:34 expdp_datapump_02.dmp
gunes@veridata# pwd
/u02/export_folder2
bash-3.2$ ls -ltr
-rw-r----- 1 oracle oinstall 7420000 Oct 03 02:34 expdp_datapump_03.dmp
-rw-r----- 1 oracle oinstall 620000 Oct 03 02:34 expdp_datapump_04.dmp

Here are some important points:
1. The parallel parameter must be used while using multiple directories, otherwise expdp will not fail but it will write to the only first directory.
2. The number of directories used must be equal to the parallel parameter then only all directories will be used for writing.

If you want to use those export on a different server by using multiple paths, then you need to follow below syntax:

$ORACLE_HOME/bin/impdp "'/ as sysdba'" logfile=EXPDP1:test_imp.LOG dumpfile=EXPDP1:test_01.dmp,EXPDP1:test_02.dmp,EXPDP2:test_03.dmp,EXPDP2:test_04.dmp parallel=2
Advertisements