oracle 使用 expdp 备份数据库
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/18889063/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
using expdp backup database
提问by Dolphin
When i backup oracle using this statement:
当我使用此语句备份 oracle 时:
EXPDP userid=scott/tiger@orcl directory=DATA_PUMP_DIR dumpfile=%filename%.DMP
It has 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
DATA_PUMP_DIR 是
D:\app\Administrator\admin\orcl\dpdump\
More inportantly, I created the directory by myself. It still gives the same error and I am very sure the directories exists.
更重要的是,我自己创建了目录。它仍然给出相同的错误,我非常确定目录存在。
回答by Dba
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;
回答by a_horse_with_no_name
What the error message is telling you, is that the user SCOTT
does not have the privileges to write to DATA_PUMP_DIR
.
错误消息告诉您的是,用户SCOTT
没有写入DATA_PUMP_DIR
.
As the DBA run
作为 DBA 运行
grant read, write on directory DATA_PUMP_DIR to scott;
回答by David Aldridge
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.
D:\app\Administrator\admin\orcl\dpdump\ 是服务器上的目录吗?它必须可以从 Oracle 服务器软件访问才能有效,因为导出实际上是在服务器上运行,而不是在客户端上运行。
回答by Guna Sekaran
Error: ORA-39087: directory name C:\DUMP\PUB is invalid
错误:ORA-39087:目录名 C:\DUMP\PUB 无效
solution:
解决方案:
grant create any directory to ATGDB_EB_PUB;
向 ATGDB_EB_PUB 授予创建任何目录的权限;
create directory YOUR_PATH as 'C:\dump\pub';
创建目录 YOUR_PATH 为 'C:\dump\pub';
回答by Mohammad Ibrahim
impdp user/pass12@ETATD directory=EDWEXPORT dumpfile=NETWORK_ACTIVITY_SETT_TEMP.dmp logfile=NETWORK_ACTIVITY_SETT_TEMP.log full=y;
impdp user/pass12@ETATD directory=EDWEXPORT dumpfile=NETWORK_ACTIVITY_SETT_TEMP.dmp logfile=NETWORK_ACTIVITY_SETT_TEMP.log full=y;
Import: Release 12.2.0.1.0 - Production on Sun May 12 09:42:02 2019
导入:发布 12.2.0.1.0 - 2019 年 5 月 12 日星期日 09:42:02 生产
Copyright (c) 1982, 2017, Oracle and/or its affiliates. All rights reserved.
版权所有 (c) 1982, 2017,Oracle 和/或其附属公司。版权所有。
Connected to: Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production ORA-39002: invalid operation ORA-39070: Unable to open the log file. ORA-39087: directory name EDWEXPORT is invalid
连接到:Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64 位生产 ORA-39002:无效操作 ORA-39070:无法打开日志文件。ORA-39087: 目录名 EDWEXPORT 无效