oracle impdp/expdp 的权限问题
来源:互联网 发布:淘宝上宝贝排名靠前 编辑:程序博客网 时间:2024/05/21 10:49
直接运行 expdp scott/tiger
系统报错:
ORA-39002: invalid operation
ORA-39070: Unable to open the log file.
ORA-39145: directory object parameter must be specified and non-null
网上说要把在 data_dump_dir 上的 read,write 的权限赋予scott。按照此说法做后,发现问题依然。
grant dba to scott 权限后,问题解决。
其实问题的核心不在于dba权限,而在于 EXP_FULL_DATABASE / IMP_FULL_DATABASE 角色。
oracle的官方文档中早就有了此问题和原因(Oracle® Database Utilities):
The following is an example of using the default DATA_PUMP_DIR directory object available to privileged users. This example assumes that the EXP_FULL_DATABASE and IMP_FULL_DATABASE roles have been granted to the user hr. After the DATA_PUMP_DIR directory object has been created, a privileged user need not use the DIRECTORY parameter. Dump files, log files, and SQL files will be written to the path associated with DATA_PUMP_DIR.
SQL> CREATE DIRECTORY data_pump_dir AS '/usr/dba/dpumpfiles':
> expdp hr/hr DUMPFILE=emp.dmp LOGFILE=emp.log TABLES=hr.employees
The emp.dmp and emp.log files will be written to /usr/dba/dpumpfiles.
If the DATA_PUMP_DIR directory object had not first been created by a DBA, then the following error messages would have been displayed:
ORA-39002: invalid operation
ORA-39070: Unable to open the log file.
ORA-39087: directory name DATA_PUMP_DIR is invalid
Remember that the default DATA_PUMP_DIR directory object is not available to nonprivileged users. In the following example, user sh is a nonprivileged user. Therefore, because no directory object is specified, error messages are generated and the export is not performed.
> expdp sh/sh DUMPFILE=sales.dmp LOGFILE=sales.log TABLES=sh.sales
ORA-39002: invalid operation
ORA-39070: Unable to open the log file.
ORA-39145: directory object parameter must be specified and non-null
Thomas Kyte建议的要从头到尾看 Oracle Concept Guide,绝对是见很正确的事。
原文地址:http://www.douban.com/note/37656300/
- oracle impdp/expdp 的权限问题
- Oracle expdp/impdp的使用方法
- oracle的expdp和impdp
- Oracle 11g expdp与impdp导入遇到的问题
- ORACLE EXP/IMP EXPDP/IMPDP的区别
- ORACLE EXP/IMP EXPDP/IMPDP的区别
- oracle expdp impdp 的简要说明
- oracle的expdp和impdp命令研究
- oracle的exp和imp、expdp、impdp
- ORACLE EXPDP/IMPDP
- oracle expdp,impdp study
- oracle expdp impdp
- ORACLE expdp-impdp使用
- oracle expdp impdp 用法
- Oracle-expdp&impdp小结
- Oracle Expdp Impdp 详解
- oracle expdp/impdp使用方法
- oracle Expdp和impdp
- 20160108HTML学习笔记html的四大基本结构
- C#实现SFTP文件传输
- 使用std::string 通过dll接口传递时,应该注意的问题
- 华为机试——删除一个字符串中出现次数最少的字符
- DML、DDL、DCL区别 .
- oracle impdp/expdp 的权限问题
- java字符分割
- 安卓弹出提示显示框
- java MVC
- 外牌年检车辆在上海办理年检
- Xcode7免证书真机调试
- Android studio 打包apk如何重命名apk名称
- android无限自动轮播图控件
- Linux的发展