Oracle 数据泵导入到 sql 文件错误:ORA-31655 没有数据或元数据对象

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/2140054/
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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-18 19:53:01  来源:igfitidea点击:

Oracle Data Pump import to a sql file error :ORA-31655 no data or metadata objects

oracleimportdatapump

提问by Francisco Qui?ones

I'm using Data Pump to export/import data, one requirement is to import data to a sql file. The OS is window. I made the follow export :

我正在使用数据泵导出/导入数据,其中一项要求是将数据导入 sql 文件。操作系统是窗口。我做了以下导出:

expdp system/password directory=dpump_dir dumpfile=tablesdump.dmp content=DATA_ONLY tables=user.tablename

and it works, I can see the file TABLESDUMP.DMP in the directory path.

它有效,我可以在目录路径中看到文件 TABLESDUMP.DMP。

then when I tried to import it to a sql file:

然后当我尝试将其导入 sql 文件时:

impdp system/password directory=dpump_dir dumpfile=tablesdump.dmp sqlfile=tables_export.sql

the log show :

日志显示:

.....
ORA-31655 no data or metadata objects selected for job
.....

and the sql file is created empty in the directory path.

并且 sql 文件在目录路径中创建为空。

I'm not DBA, I'm a Java developer , Can you help me?

我不是 DBA,我是 Java 开发人员,你能帮我吗?

Thks

谢谢

回答by Francisco Qui?ones

Since I exported the data using the parameter 'content=data_only' the dump file has not metadata info to be imported.I tried export with 'content=all' paramteer and then import to sql file worked. I hope this be helpful for other cases.

由于我使用参数“content=data_only”导出数据,因此转储文件没有要导入的元数据信息。我尝试使用“content=all”参数导出,然后导入到 sql 文件工作。我希望这对其他情况有帮助。

Thks to Anurag Tibrewa.

感谢 Anurag Tibrewa。