Using flat files

Create the directories

SQL> CREATE DIRECTORY dpump_dir1 AS ‘/usr/apps/datafiles’;

SQL> GRANT READ, WRITE ON DIRECTORY dpump_dir1 TO hr;

SQL> CREATE DIRECTORY DUMP_FILES1 AS ‘/usr/apps/dumpfiles1’;

$ setenv DATA_PUMP_DIR DUMP_FILES1

$ expdp hr/hr TABLES=employees DUMPFILE=employees.dmp

SQL> SELECT directory_name, directory_path FROM dba_directories WHERE directory_name=’DATA_PUMP_DIR’;


DEFAULT DIRECTORY =
$ORACLE_HOME/rdbms/log/


Using ASM

SQL> CREATE or REPLACE DIRECTORY dpump_dir as ‘+DATAFILES/’;

SQL> CREATE or REPLACE DIRECTORY dpump_log as ‘/homedir/user1/’;

SQL> GRANT READ, WRITE ON DIRECTORY dpump_dir TO hr;

SQL> GRANT READ, WRITE ON DIRECTORY dpump_log TO hr;

$ expdp hr/hr DIRECTORY=dpump_dir DUMPFILE=hr.dmp LOGFILE=dpump_log:hr.log