我想导入Oracle Database 12c Enterprise Edition Release 12.1.0.1.0 - 64bit Production
使用命令:
impdp SOLVIA/SOLVIA900@IMMBO DIRECTORY=DB_EXP DUMPFILE=week_exp_immbo.dmp LOGFILE=week_exp_immbo.log REUSE_DATAFILES=YES exclude=tablespace:"IN ('IMMBO')"
但我收到了这个错误:
Connected to: Oracle Database 12c Standard Edition Release 12.2.0.1.0 - 64bit Production
ORA-39001: invalid argument value
ORA-39071: Value for EXCLUDE is badly formed.
ORA-00936: missing expression
答案 0 :(得分:1)
在命令模式下使用数据泵排除参数要求将语句转义
您正在使用的调用看起来很合理。
这是:
impdp SOLVIA/SOLVIA900@IMMBO DIRECTORY=DB_EXP DUMPFILE=week_exp_immbo.dmp LOGFILE=week_exp_immbo.log REUSE_DATAFILES=YES exclude=tablespace:"IN ('IMMBO')"
根据My Oracle Support文档How To Resolve The Error ORA-39071 Value For EXCLUDE Is Badly Formed (Doc ID 734324.1),您需要*转义这样的引用:
impdp SOLVIA/SOLVIA900@IMMBO DIRECTORY=DB_EXP DUMPFILE=week_exp_immbo.dmp LOGFILE=week_exp_immbo.log REUSE_DATAFILES=YES exclude=tablespace:\"IN (\'IMMBO\')\"
*:Linux操作系统需要转义引号。这不适用于Windows操作系统。