在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
ORA-39002: invalid operation
原因如下: 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.
DATA_PUMP_DIR 目录需要有EXP_FULL_DATABASE role and IMP_FULL_DATABASE role ,而12c pdb 下的system 用户没有该roll:
在cdb 下 system: PRIVILEGE 列为空, SET lines 80
/centrproddblog/dump DATA_PUMP_DIR /opt/oracle12c/admin/centrprod/dpdump/
OPATCH_INST_DIR /opt/oracle12c/product/12.1/OPatch OPATCH_LOG_DIR
OPATCH_SCRIPT_DIR /opt/oracle12c/product/12.1/QOpatch
XSDDIR /opt/oracle12c/product/12.1/rdbms/xml/schema
SQL> SQL>
在pdb 下 system: 即便给了读写权限给system, 仍然没有IMP_FULL_DATABASE rool; SQL> / DIRECTORY_NAME DATA_PUMP_DIR DATA_PUMP_DIR 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';
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:\> set DATA_PUMP_DIR=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) |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论