Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using expdp to backup database

Tags:

oracle

backup

When I backup Oracle using this statement:

EXPDP userid=scott/tiger@orcl directory=DATA_PUMP_DIR dumpfile=%filename%.DMP

It has this error:

Ora-39002:The operation is invalid
Ora-3970:can not open the log file
Ora-39087:directory name DATA_PUMP_DIR is invalid

When I run:

select * from dba_directories;

The DATA_PUMP_DIR is

D:\app\Administrator\admin\orcl\dpdump\

More importantly, I created the directory by myself. It still gives the same error and I am very sure the directories exist.

like image 506
Dolphin Avatar asked Sep 19 '13 07:09

Dolphin


2 Answers

Is D:\app\Administrator\admin\orcl\dpdump\ a directory on the server? It has to be accessible from the Oracle server software to be valid, as the export actually runs on the server and not the client.

like image 97
David Aldridge Avatar answered Oct 02 '22 14:10

David Aldridge


You need to grant read and write permission on directory to user for taking backup.(Assuming that you have all the rights)

GRANT read, write ON DIRECTORY data_pump_dir TO scott;
like image 29
Dba Avatar answered Oct 02 '22 14:10

Dba