Google it ....

Showing posts with label impdp. Show all posts
Showing posts with label impdp. Show all posts

Wednesday, April 10, 2019

ORA-39142: incompatible version number 5.1 in dump file

Recently I faced error:
ORA-39001: invalid argument value
ORA-39000: bad dump file specification
ORA-39142: incompatible version number 5.1 in dump file 
while making import table data on Oracle Database 11g.

Dump file was made from Oracle Database 12c (12.2.0.1.0) with parameter compatible to 12.2.0
SQL> show parameter compatible
 
NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
compatible                           string      12.2.0
noncdb_compatible                    boolean     FALSE
 
SQL> 

and during impdp on Oracle Database 11g (11.2.0.4.0) with compatible parameter to 11.2.0.4.0 occurred error:
ORA-39001: invalid argument value
ORA-39000: bad dump file specification
ORA-39142: incompatible version number 5.1 in dump file "xxx.dmp"

Data Pump Import can always read Data Pump dump file sets created by older releases of the database but In a downgrade situation, when the target release of a Data Pump-based migration is lower than the source, the VERSION parameter should be explicitly specified to be the same version as the target. An exception is when the target release version is the same as the value of the COMPATIBLE initialization parameter on the source system; then VERSION does not need to be specified. In general however, Data Pump import cannot read dump file sets created by an Oracle release that is newer than the current release unless the VERSION parameter is explicitly specified
So solution is to specify value of target database compatible parameter in version parameter in expdp while exporting table.

for my situation on expdp on 12c database I specify version=11.2 and impdp on 11g run successfully.

on Oracle Database 12c (12.2.0.1.0) with compatible 12.2.0
expdp test_user/test_pass version=11.2 tables=test_table CONTENT=DATA_ONLY directory=TEST_DUMP dumpfile=test.dmp logfile=test_exp.log

on Oracle Database 11g (11.2.0.4.0) with compatible 11.2.0.4.0
impdp test_user/test_pass tables=test_table CONTENT=DATA_ONLY directory=TEST_DUMP dumpfile=test.dmp logfile=test_imp.log

Thursday, February 27, 2014

ORA-39002: invalid operation ORA-39070: Unable to open the log file. ORA-29283: invalid file operation ORA-06512: at SYS.UTL_FILE, ORA-29283: invalid file operation

When doing export with expdp occur next error:
ORA-39002: invalid operation 
ORA-39070: Unable to open the log file. 
ORA-29283: invalid file operation 
ORA-06512: at "SYS.UTL_FILE", 
ORA-29283: invalid file operation
Solution is simple let's check directories:

SQL> select directory_name, directory_path from dba_directories
DIRECTORY_NAME     DIRECTORY_PATH
——————————————————————————–
DUMP_DIR       /u02/dump_dir

Two thing's that hadn't done is:

1) given correct permissions for that user to acccess the logical directory for export:
SQL> GRANT read, write on directory dump_dir TO ika; <-- username

2) create the physical directory, remember that in linux characters are different with uppercase and lowercase
[oracle@oel6]$ mkdir -p /u02/dump_dir

after that our export run successfully.

Tuesday, February 18, 2014

How to stop/kill expdp/impdp processes

Here is shown how to kill/stop expdp/impdp processes.
Sometimes it's really need to killing expdp or impdp processes because wrong import or export, or heavy load on database or many other situation.
1) you need to identify job name, which you can view in data dictionary views:
select * from USER_DATAPUMP_JOBS;
select * from DBA_DATAPUMP_SESSIONS;

2) you need to attach that job find in above views:
impdp system/***** attach=test_dump(job_name)

3) stop job with command:
STOP_JOB=IMMEDIATE

That's all.