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

iam is really new in oracle and databases. Sorry, maybe a stupid question.

Here is my problem. I have a DB export (not mine, so I don’t know how it was exported: are there any 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 the following errors do not 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's wrong? How can I fix this in a script? And how can I import a file without using a script? I read about the command imp file = filename. but where to enter it? :)

Thanks.

BR

+6
source share
5 answers

Try it,

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

Or you can import using a system user,

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

The impdp command is used to import dump files exported using a data pump. Try using the "imp" command.

+2
source

import dump file in oracle 11g

SQL command line

  • CREATE USER USER IDENTIFIED BY password

  • provide dba for username;

At the command line

  • imp userid = username / password FULL = y FILE = "D: \ yourdumpfilename.dmp"

Note. Be sure to specify the path to the dump file.

+2
source

@ user2794543

Go to the Command Prompt (Ctrl + R on the desktop β†’ type cmd in the search field β†’ press enter β†’ you will land on the command line).

Now change your directory to root C: (type "cd .." β†’ hit enter β†’ type "cd .." gain β†’ hit enter β†’ you are now in the root directory of C :).

Then you need to import using "imp" and not "impdp". Enter the following command line:

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

Press Enter and wait for the process.

* Ignore square brackets. They are for reference purpose.

+1
source

DMP was exported by the imp.exe utility for Oracle 12c, and I received an error while trying to import imp.exe from Oracle 11g. Permission in my case: copy and paste im.exe from the folder from 12c to 11g ... \ bin and import successfully.

0
source

Source: https://habr.com/ru/post/954146/


All Articles