当我使用此语句备份oracle时:
EXPDP userid=scott/tiger@orcl directory=DATA_PUMP_DIR dumpfile=%filename%.DMP
它有错误:
Ora-39002:The operation is invalid Ora-3970:can not open the log file Ora-39087:directory name DATA_PUMP_DIR is invalid
当我跑:
select * from dba_directoris;
DATA_PUMP_DIR是
D:\app\Administrator\admin\orcl\dpdump\
更重要的是,我自己创建了目录.它仍然提供相同的错误,我非常确定目录存在.
您需要向用户授予对目录的读写权限以进行备份.(假设您拥有所有权限)
GRANT read,write ON DIRECTORY data_pump_dir TO scott;