如何从 dmp 文件和日志文件导入 Oracle 数据库?

2021-12-30 00:00:00 oracle11g oracle oracle-dump

我将如何从转储文件创建数据库?我的系统上没有具有相同结构的现有数据库,因此它必须包含作业、事件、表等.

How would I go about creating a database from a dump file? I do not have an existing database with the same structure on my system so it has to be complete with jobs, events, tables, and so on.

我将转储和日志文件放在 E: 驱动器中

I placed the dump and log file in E: drive

我已经尝试过导入实用程序

I have tried the import utility

E:/>impdp system/tiger@oratest FILE=WB_PROD_FULL_20MAY11.dmp

但我收到错误

invalid argument value
bad dump file specification
unable to open dump file "E:appadminoratestdpdumpWB_PROD_F
ULL_20MAY11.dmp" for read
unable to open file
unable to open file
(OS 2) The system cannot find the file specified.

当我在 Windows 资源管理器中看到 DMP 文件(取自 Linux 服务器)显示为崩溃转储文件时

And when I see in Windows Explorer DMP file(taken from Linux server) is showing as Crash dump file

我不明白如何解决这个问题.请帮我解决这个问题.

I don't understand how I can resolve this issue. Please help me to solve this issue.

我是 Oracle 的完全新手...

I'm a complete newbie on Oracle...

推荐答案

数据库是如何导出的?

  • 如果它是使用 exp 导出的,并且导出了完整的架构,则

  • If it was exported using exp and a full schema was exported, then

  1. 创建用户:

  1. Create the user:

create user <username> identified by <password> default tablespace <tablespacename> quota unlimited on <tablespacename>;

  • 授予权利:

  • Grant the rights:

    grant connect, create session, imp_full_database to <username>;
    

  • 使用 imp 开始导入:

    imp <username>/<password>@<hostname> file=<filename>.dmp log=<filename>.log full=y;
    

  • 如果是使用expdp导出的,则使用impdp开始导入:

  • If it was exported using expdp, then start the import with impdp:

    impdp <username>/<password> directory=<directoryname> dumpfile=<filename>.dmp logfile=<filename>.log full=y;
    

  • 看错误日志,好像没有指定目录,所以Oracle尝试在默认目录(即E:appVensi)中找到dmp文件adminoratestdpdump).

    Looking at the error log, it seems you have not specified the directory, so Oracle tries to find the dmp file in the default directory (i.e., E:appVensiadminoratestdpdump).

    要么将导出文件移动到上述路径,要么创建一个指向dmp文件所在路径的目录对象,并将对象名称传递给impdp上面的命令.

    Either move the export file to the above path or create a directory object to pointing to the path where the dmp file is present and pass the object name to the impdp command above.

    相关文章