Oracle 11g dmp 导入。ORA-39000 / ORA-39143 错误

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

Oracle 11g dmp import. ORA-39000 / ORA-39143 Errors

oracleimportoracle11g

提问by user2794543

iam really new in oracle and databases at all. So sorry for a maybe stupid question.

我在 oracle 和数据库方面真的很新。很抱歉问一个可能很愚蠢的问题。

Here is my problem. I have a DB export (not mine so i dont know how it was exported: are there differences?) and i want to import it with the following script:

这是我的问题。我有一个数据库导出(不是我的,所以我不知道它是如何导出的:有区别吗?)我想用以下脚本导入它:

@Echo off
Break off
Rem fullimpdp.cmd
set NLS_LANG=american_america.WE8MSWIN1252
set ORACLE_HOME=C:\Oracle\ora11
Set DUMP_HOME=C:\DBDump
set /p ORACLE_SID="Oracle_sid = "
set /p FILE="Dump file name = "
if exist %DUMP_HOME%SetBackupDir_%ORACLE_SID%.sql del /F /Q %DUMP_HOME%SetBackupDir_%ORACLE_SID%.sql
echo CREATE OR REPLACE DIRECTORY backup_dir AS '%DUMP_HOME%'; >%DUMP_HOME%SetBackupDir_%ORACLE_SID%.sql
echo CREATE OR REPLACE DIRECTORY dmpdir AS '%DUMP_HOME%'; >>%DUMP_HOME%SetBackupDir_%ORACLE_SID%.sql
echo commit; >>%DUMP_HOME%SetBackupDir_%ORACLE_SID%.sql
echo exit    >>%DUMP_HOME%SetBackupDir_%ORACLE_SID%.sql
set ORACLE_SID=%ORACLE_SID%
%ORACLE_HOME%\bin\sqlplus xpower/xpower @%DUMP_HOME%SetBackupDir_%ORACLE_SID%.sql
%ORACLE_HOME%\bin\impdp xpower/xpower FULL=y DIRECTORY=backup_dir DUMPFILE=%FILE% logfile=impdp_%ORACLE_SID%.log JOB_NAME=impfull_%Oracle_sid%
if exist %DUMP_HOME%SetBackupDir_%ORACLE_SID%.sql del /F /Q %DUMP_HOME%SetBackupDir_%ORACLE_SID%.sql
pause

But not the following errors occur:

但不会出现以下错误:

Connected to: Oracle Database 11g Release 11.2.0.3.0 - 64bit Production
ORA-39000: bad dump file specification
ORA-39143: dump file "C:\DBDump\ev122.dmp" may be an original export dump file

What is wrong? How can i fix it in this script? And how can i import the file not using the script? I read about the imp file=filename command. but where to type it in? :)

怎么了?我如何在这个脚本中修复它?以及如何不使用脚本导入文件?我读到了 imp file=filename 命令。但是在哪里输入呢?:)

Thank you.

谢谢你。

BR

BR

回答by Dba

Try like this,

试试这样,

imp xpower/xpower FULL=y file=<file_name>.dmp log=log_file_name.log

Or you can import using system user,

或者您可以使用系统用户导入,

imp system/<password> file=<file_name>.dmp log=log_file_name.log fromuser = <from_user_name> touser= xpower

回答by Chamal Pradeep Rajapakse

impdp command is used to import dump files exported by data pump. Try to use "imp" command.

impdp 命令用于导入数据泵导出的转储文件。尝试使用“imp”命令。

回答by CuriousGirl

importing dump file in oracle 11g

在 oracle 11g 中导入转储文件

In SQL Command Line,

在 SQL 命令行中,

  1. CREATE USER username IDENTIFIED BY password

  2. grant dba to username;

  1. CREATE USER 用户名 IDENTIFIED BY 密码

  2. 将 dba 授予用户名;

In Command Line,

在命令行中,

  1. imp userid=username/password FULL=y FILE="D:\yourdumpfilename.dmp"
  1. imp userid=用户名/密码 FULL=y FILE="D:\yourdumpfilename.dmp"

Note ..Be sure the path of your dump file .

注意..请确保您的转储文件的路径。

回答by hashir

@user2794543

@用户2794543

Go to your Command-Prompt(Ctrl+R on your desktop -> type cmdin search box -> hit enter -> you will land in Command Prompt).

转到您的命令提示符(桌面上的 Ctrl+R ->在搜索框中键入cmd-> 按 Enter -> 您将进入命令提示符)。

Now, change your directory to root C: (type "cd.."-> hit enter -> type "cd.."gain -> hit enter -> now you are at root C: directory).

现在,将您的目录更改为根 C:(键入“cd..”-> 按 Enter -> 键入“cd..”gain -> 按 Enter -> 现在您位于根 C: 目录)。

Next you have to import using "imp"and not "impdp". Type the following command line :

接下来,您必须使用"imp"而不是"impdp"导入。键入以下命令行:

imp userid=system/[password]  file=[drive]:\[folder]\[dump_file_name].dmp full=y;

Hit enter and wait for the process flow.

按 Enter 键并等待流程。

*Ignore the square braces. They are for referencial purpose.

*忽略方括号。它们仅供参考。

回答by Rovshan Sagdiev

DMP was exported by imp.exe utility of Oracle 12c and I was getting an error while trying import by imp.exe of Oracle 11g. Resolution in my case is: copy and paste imp.exe from 12c to 11g ...\bin folder and succesfully imported.

DMP 是由 Oracle 12c 的 imp.exe 实用程序导出的,在尝试通过 Oracle 11g 的 imp.exe 导入时出现错误。在我的情况下,解决方案是:将 imp.exe 从 12c 复制并粘贴到 11g ...\bin 文件夹并成功导入。