导入 oracle 转储时出错

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

Error importing oracle dump

oracleimportdump

提问by atlantis

I am trying to import a dump into two schema in the same oracle DB.Following a workaround to do this.

我正在尝试将转储导入到同一个 oracle DB 中的两个模式中。遵循一种解决方法来执行此操作。

I am trying to run the imp command with the INDEXFILE option to be able to modify the tablespace names in the sql. This is what I get :

我正在尝试使用 INDEXFILE 选项运行 imp 命令,以便能够修改 sql 中的表空间名称。这就是我得到的:

E:\oracle_10_2\BIN>imp atlantis/atlantis@orcl file=ABCD1_EXCLUDE_CLOB_TABS_BAK.dmp indexfile=index.sql full=y log=imp.log

Import: Release 10.2.0.1.0 - Production on Thu Mar 12 15:31:44 2009

Copyright (c) 1982, 2005, Oracle. All rights reserved.

Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Produc tion With the Partitioning, OLAP and Data Mining options

IMP-00002: failed to open ABCD1_EXCLUDE_CLOB_TABS_BAK.dmp for read Import file: EXPDAT.DMP >

E:\oracle_10_2\BIN>imp atlantis/atlantis@orcl file=ABCD1_EXCLUDE_CLOB_TABS_BAK.dmp indexfile=index.sql full=y log=imp.log

导入:发布 10.2.0.1.0 - 2009 年 3 月 12 日星期四 15:31:44 生产

版权所有 (c) 1982、2005,Oracle。版权所有。

连接到:Oracle 数据库 10g 企业版 10.2.0.1.0 版 - 使用分区、OLAP 和数据挖掘选项进行生产

IMP-00002:无法打开 ABCD1_EXCLUDE_CLOB_TABS_BAK.dmp 以读取导入文件:EXPDAT.DMP >

Looked like a file permission issue to me so I tried changing it.

对我来说看起来像是文件权限问题,所以我尝试更改它。

E:\oracle_10_2\BIN>cacls E:\ABCD1_EXCLUDE_CLOB_TABS_BAK.dmp /p atlantis:F

Are you sure (Y/N)?y

processed file: E:\ABCD1_EXCLUDE_CLOB_TABS_BAK.dmp

E:\oracle_10_2\BIN>cacls E:\ABCD1_EXCLUDE_CLOB_TABS_BAK.dmp

E:\ABCD1_EXCLUDE_CLOB_TABS_BAK.dmp CORP\atlantis:F

E:\oracle_10_2\BIN>cacls E:\ABCD1_EXCLUDE_CLOB_TABS_BAK.dmp /p atlantis:F

你确定(是/否)?是

处理文件:E:\ABCD1_EXCLUDE_CLOB_TABS_BAK.dmp

E:\oracle_10_2\BIN>cacls E:\ABCD1_EXCLUDE_CLOB_TABS_BAK.dmp

E:\ABCD1_EXCLUDE_CLOB_TABS_BAK.dmp CORP\atlantis:F

But the problem persists.

但问题仍然存在。

回答by FerranB

If you are using Oracle 10g consider using new export/import tool Oracle Data Pumpin which you can use REMAP_TABLESPACEparameter.

如果您使用的是 Oracle 10g,请考虑使用新的导出/导入工具Oracle Data Pump,您可以在其中使用REMAP_TABLESPACE参数。

Anyway, you missed the path of the exportfile (bassed on the commands fo give permissions). Then You wrote:

无论如何,您错过了导出文件的路径(基于授予权限的命令)。然后你写道:

file=ABCD1_EXCLUDE_CLOB_TABS_BAK.dmp

instead of

代替

file=E:\ABCD1_EXCLUDE_CLOB_TABS_BAK.dmp

Then, the result export command to work is:

然后,要工作的结果导出命令是:

imp atlantis/atlantis@orcl file=E:\ABCD1_EXCLUDE_CLOB_TABS_BAK.dmp indexfile=index.sql full=y log=imp.log

回答by Shahid Hussain Abbasi

Open window command line as administrator imp user/pass@databasename(listenername) file='DMP path' log=indexfile.log full=y;

以管理员身份打开窗口命令行 imp user/pass@databasename(listenername) file='DMP path' log=indexfile.log full=y;

Don't forget to add your database or listener name.

不要忘记添加您的数据库或侦听器名称。