为什么在 Oracle 12c 中尝试 impdp 时出现 ORA-39001: invalid argument value?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/37053139/
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
Why do I get ORA-39001: invalid argument value when I try to impdp in Oracle 12c?
提问by Sam
When I run this command in Oracle 12c SE2:
当我在 Oracle 12c SE2 中运行此命令时:
impdp system/Oracle_1@pdborcl directory=DATA_PUMP_DIR dumpfile=mydb.dmp nologfile=Y
I get this:
我明白了:
ORA-39001 : invalid argument value
ORA-39000 : bad dump file specification
ORA-39088 : directory name DATA_PUMP_DIR is invalid
ORA-39001 : 无效的参数值
ORA-39000 : 错误的转储文件规范
ORA-39088 : 目录名 DATA_PUMP_DIR 无效
We used to import this into 11g all the time.
我们过去一直把它导入到 11g 中。
How can I solve these errors?
我该如何解决这些错误?
回答by Alex Poole
Be aware of the following requirements when using Data Pump to move data into a CDB:
...
- The default Data Pump directory object, DATA_PUMP_DIR, does not work with PDBs. You must define an explicit directory object within the PDB that you are exporting or importing.
使用数据泵将数据移动到 CDB 时,请注意以下要求:
...
- 默认数据泵目录对象 DATA_PUMP_DIR 不适用于 PDB。您必须在要导出或导入的 PDB 中定义显式目录对象。
You will need to define your own directory object in your PDB, which your user (system here) has read/write privileges against.
您需要在 PDB 中定义自己的目录对象,您的用户(此处为系统)对其具有读/写权限。
create directory my_data_pump_dir as 'C:\app\OracleHomeUser1\admin\orcl\dpdump';
grant read, write on directory my_data_pump_dir to system;
It can be the same operating system directory that DATA_PUMP_DIR points to, you just need a separate directory object. But I've used the path you said you'd prefer, from a comment on a previous question.
它可以是 DATA_PUMP_DIR 指向的相同操作系统目录,您只需要一个单独的目录对象。但我已经使用了你说你喜欢的路径,来自对上一个问题的评论。
Then the import is modified to have:
然后将导入修改为:
... DIRECTORY=my_data_pump_dir DUMPFILE=mydb.dmp