本文介绍了如何确定Oracle Data Pump Export文件中的Schema的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


  • 我有一个用expdp创建的Oracle数据库备份文件(.dmp)。

  • .dmp文件是整个数据库的导出。

  • 我需要从此转储文件中恢复其中一个模式。

  • 我不知道此转储文件中的模式名称。

  • 要使用impdp导入数据,我需要加载架构的名称。

  • I have a Oracle database backup file (.dmp) that was created with expdp.
  • The .dmp file was an export of an entire database.
  • I need to restore 1 of the schemas from within this dump file.
  • I dont know the names of the schemas inside this dump file.
  • To use impdp to import the data i need the name of the schema to load.

所以,我需要检查.dmp文件并列出其中的所有模式,我该怎么做?

So, I need to inspect the .dmp file and list all of the schemas in it, how do i do that?

更新(2008-09-18 13:02) - 更详细的信息:

我目前使用的impdp命令是:

The impdp command i'm current using is:

impdp user/password@database directory=DPUMP_DIR 
      dumpfile=EXPORT.DMP logfile=IMPORT.LOG  

并正确配置了DPUMP_DIR。

And the DPUMP_DIR is correctly configured.

SQL> SELECT directory_path
2  FROM dba_directories
3  WHERE directory_name = 'DPUMP_DIR';

DIRECTORY_PATH
-------------------------
D:\directory_path\dpump_dir\

是的,EXPORT.DMP文件实际上在该文件夹中。

And yes, the EXPORT.DMP file is infact in that folder.

运行impdp命令时收到的错误信息是:

The error message I get when I run the impdp command is:

Connected to: Oracle Database 10g Enterprise Edition ...
ORA-31655: no data or metadata objects selected for job
ORA-39154: Objects from foreign schemas have been removed from import

此错误消息主要是预期的。我需要impdp命令:

This error message is mostly expected. I need the impdp command be:

impdp user/password@database directory=DPUMP_DIR dumpfile=EXPORT.DMP 
      SCHEMAS=SOURCE_SCHEMA REMAP_SCHEMA=SOURCE_SCHEMA:MY_SCHEMA

但要做到这一点,我需要源架构。

But to do that, I need the source schema.

推荐答案

如果使用可以处理大文件的编辑器打开DMP文件,您可能能够找到模式名称所在的区域提及。请务必不要改变任何事情。如果您打开原始转储的副本会更好。

If you open the DMP file with an editor that can handle big files, you might be able to locate the areas where the schema names are mentioned. Just be sure not to change anything. It would be better if you opened a copy of the original dump.

这篇关于如何确定Oracle Data Pump Export文件中的Schema的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-30 03:16