12c pdb expdp use DATA_PUMP_DIR meet ORA-39145
ORA-39002: invalid operation
ORA-39070: Unable to open the log file.
ORA-39087: directory name DATA_PUMP_DIRis invalid
原因如下:
If none of the previous three conditions yields a directory object and you are a privileged user (i.e. uses who have the EXP_FULL_DATABASE role and IMP_FULL_DATABASE role), then Data Pump attempts to use the value of the default server-based directory object, DATA_PUMP_DIR.
It is important to understand that Data Pump does not create the DATA_PUMP_DIR directory object; it merely attempts to use its value when a privileged user has not provided a directory object using any of the mechanisms previously described. This default directory object must first be created by a DBA. Do not confuse this with the client-based environment variable of the same name.
Example to create all files in the directory DATA_PUMP_DI
DATA_PUMP_DIR 目录需要有EXP_FULL_DATABASE role and IMP_FULL_DATABASE role ,而12c pdb 下的system 用户没有该roll:
在cdb 下 system: PRIVILEGE 列为空,
SET lines 80
COL grantee FORMAT a20
COL privilege FORMAT a10
SELECT directory_name, grantee, privilege,DIRECTORY_PATH
FROM user_tab_privs t, all_directories d
WHERE t.table_name(+)=d.directory_name
ORDER BY 1,2,3;
DIRECTORY_NAME
--------------------------------------------------------------------------------
GRANTEE PRIVILEGE
-------------------- ----------
DIRECTORY_PATH
--------------------------------------------------------------------------------
DATAPUMP
/centrproddblog/dump
DATA_PUMP_DIR
/opt/oracle12c/admin/centrprod/dpdump/
OPATCH_INST_DIR
/opt/oracle12c/product/12.1/OPatch
OPATCH_LOG_DIR
/opt/oracle12c/product/12.1/QOpatch
OPATCH_SCRIPT_DIR
/opt/oracle12c/product/12.1/QOpatch
XSDDIR
/opt/oracle12c/product/12.1/rdbms/xml/schema
8 rows selected.
SQL> SQL>
在pdb 下 system: 即便给了读写权限给system, 仍然没有IMP_FULL_DATABASE rool;
SQL> /
DIRECTORY_NAME
--------------------------------------------------------------------------------
GRANTEE PRIVILEGE
-------------------- ----------
DIRECTORY_PATH
--------------------------------------------------------------------------------
DATA_PUMP_DIR
SYSTEM READ
/opt/oracle12c/admin/centrprod/dpdump/
DATA_PUMP_DIR
SYSTEM WRITE
/opt/oracle12c/admin/centrprod/dpdump/
OPATCH_INST_DIR
/opt/oracle12c/product/12.1/OPatch
OPATCH_LOG_DIR
/opt/oracle12c/product/12.1/QOpatch
OPATCH_SCRIPT_DIR
/opt/oracle12c/product/12.1/QOpatch
解决办法:
1.pdb 下手工创建directory datapump :
create or replace directory datapump as '/centruatdblog/dump';
grant read,write on directory datapump to public;
2 使用 datapump 替代 DATA_PUMP_DIR
Solution for user SCOTT: as described in 5.3. user SCOTT can set the environment variable DATA_PUMP_DIR to MY_DIR:
C:\> expdp scott/tiger@my_db_alias DUMPFILE=expdp_s.dmp LOGFILE=expdp_s.log SCHEMAS=scott
refer:
Export/Import DataPump Parameter DIRECTORY - How to Specify a Directory (文档 ID 266875.1)
12c pdb expdp use DATA_PUMP_DIR meet ORA-39145的更多相关文章
- 转:12C PDB 配置不同的PDB监听端口
How to Define PDB Listeners With Different Ports In A Multitenant Setup Goal This Note will discuss ...
- oracle 12c pdb开启和关闭
oracle 12c pdb开启和关闭 //开启数据库 sqlplus / as sysdba; //登录连接CDB,默认是root container;startu ...
- Oracle 12c pdb的数据泵导入导出
12c推出了可插拔数据库,在一个容器cdb中以多租户的形式同时存在多个数据库pdb.在为pdb做数据泵导入导出时和传统的数据库有少许不同. 1,需要为pdb添加tansnames ...
- ORACLE 12C PDB 维护基础介绍
来自:http://www.xifenfei.com/2013/05/oracle-12c-pdb-%E7%AE%A1%E7%90%86%E4%BB%8B%E7%BB%8D1.html CDB和PDB ...
- Oracle 12c pdb自动启动
PDB Pluggable Database是12c中扛鼎的一个新特性, 但是对于CDB中的PDB,默认启动CDB时不会将所有的PDB带起来,这样我们就需要手动alter pluggable data ...
- 关于Oracle 12C pdb用户无法登录的问题
新装了oracle12c,对新的CDB和PDB用户如何登录一直一头雾水,经过一晚上的查找,终于解决. sqlplus /nolog -> conn /as sysdba 登录到oracle 将s ...
- 12C - PDB archive file
在unplug一个pdb的时候,如果将扩展名定义为.pdb,oracle就会创建一个.pdb归档文件.包含pdb数据文件和xml元数据文件的压缩文件.创建archive file之后,就不用分开拷贝数 ...
- Oracle 12c PDB和CDB全局用户权限问题
Oracle12c版本中引入了新的CDB和PDB 默认登陆CDB后创建的用户为全局用户必须以c##开头 如果要访问CDB中的表,可以用GRANT命令赋权 但是上面的赋权并不会再PDB中生效 如果要这个 ...
- oracle 12c创建可插拔数据库(PDB)与用户详解
前言 由于oracle 12c使用了CDB-PDB架构,类似于docker,在container-db内可以加载多个pluggable-db,因此安装后需要额外配置才能使用. 一.修改listener ...
随机推荐
- C++MFC编程笔记day06 MFC向导、MFC画图类使用
MFC画图 MFC画图类包含画图设备类和画图对象类 1 画图设备类 CDC类-父类是CObject,封装的是一般的画图设备,比如:显示器, 打印机等. ...
- Fp关联规则算法计算置信度及MapReduce实现思路
说明:參考Mahout FP算法相关相关源代码. 算法project能够在FP关联规则计算置信度下载:(仅仅是单机版的实现,并没有MapReduce的代码) 使用FP关联规则算法计算置信度基于以下的思 ...
- iOS中3种正则表达式的使用
1.利用NSPredicate(谓词)匹配 例如匹配有效邮箱: ? 1 2 3 4 NSString *email = @“nijino_saki@163.com”: NSString *regex ...
- PHP记录商品历史纪录
/* 记录浏览历史 */ if (!empty($_COOKIE['history'])) { if(stripos($_COOKIE['history'].',',$goods_id.',')=== ...
- hdu4941 Magical Forest
Problem Description There is a forest can be seen as N * M grid. In this forest, there is some magic ...
- 海思HI3516A开发板顺利上线
有图有真相.
- Hackrank Equal DP
Christy is interning at HackerRank. One day she has to distribute some chocolates to her colleagues. ...
- 改进Source Insight对汉字的支持
转自:http://blog.chinaunix.net/u/8681/showart_1356633.html http://blog.163.com/zhuzhihuacan@126/blog/s ...
- Element is not clickable at point SeleniumWebdriverException
Element is not clickable at point SeleniumWebdriverException | Selenium Easy http://www.seleniumeasy ...
- 借助ltp语义分析提取特征,之后,文本生成
"""地点-哪里有做-业务-的(正规|靠谱)-公司?地点-做-业务-的(正规|靠谱)-公司(有哪些?|的联系方式是什么?|哪家口碑好值得信赖?)地点-做-业务-(怎么能省 ...