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

How to import an Oracle database from dmp file and log file?(如何从 dmp 文件和日志文件导入 Oracle 数据库?)
本文介绍了如何从 dmp 文件和日志文件导入 Oracle 数据库?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

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.

    这篇关于如何从 dmp 文件和日志文件导入 Oracle 数据库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!

    本站部分内容来源互联网,如果有图片或者内容侵犯您的权益请联系我们删除!

    相关文档推荐

    SQL to Generate Periodic Snapshots from Transactions Table(用于从事务表生成定期快照的SQL)
    MyBatis support for multiple databases(MyBatis支持多个数据库)
    Oracle 12c SQL: Missing column Headers in result(Oracle 12c SQL:结果中缺少列标题)
    SQL query to find the number of customers who shopped for 3 consecutive days in month of January 2020(查询2020年1月连续购物3天的客户数量)
    How to get top 10 data weekly (This week, Previous week, Last month, 2 months ago, 3 month ago)(如何每周获取前十大数据(本周、前一周、上个月、2个月前、3个月前))
    Select the latest record for an Id per day - Oracle pl sql(选择每天ID的最新记录-Oracle pl SQL)