ORA-39142


在使用expdp/impdp进行数据迁移时遇到ORA-39142错误,这个错误产生的原因是因为在Oracle高版本中导出,导入到低的版本内,这次就从Oracle Database 11.2.0.3.0导出,导入到Oracle Database10.2.0.5.0中,以下是操作过程;
 
[@actvnew.cyou.com app]$ impdp \'/ as sysdba\' DIRECTORY=DIR_DP DUMPFILE=history_active_201209.dmp logfile=history_active_201209.log REMAP_SCHEMA=query_org_tlbb:actv remap_tablespace=QUERY_ORG_TLBB_DATA:ACTV_TABLESPACE_DATA
 
Import: Release 10.2.0.5.0 - 64bit Production on Wednesday, 10 October, 2012 15:44:12
 
Copyright (c) 2003, 2007, Oracle.  All rights reserved.
 
Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
ORA-39001: invalid argument value
ORA-39000: bad dump file specification
ORA-39142: incompatible version number 3.1 in dump file "/U01/app/history_active_201209.dmp"
 
 
解决此问题的方法是在导出端,加入version=版本号就可以了,以下重新导出
[oracle@statg oracle]$ expdp \'/ as sysdba\' DIRECTORY=DATA_PUMP_DIR DUMPFILE=history_active_201209.dmp log=history_active_201209.log tables=query_org_tlbb.history_active_201209   version=10.2.0.5.0
 
然后导入
[@actvnew.cyou.com app]$ impdp \'/ as sysdba\' DIRECTORY=DIR_DP DUMPFILE=history_active_201209.dmp logfile=history_active_201209.log REMAP_SCHEMA=query_org_tlbb:actv remap_tablespace=QUERY_ORG_TLBB_DATA:ACTV_TABLESPACE_DATA
 
Import: Release 10.2.0.5.0 - 64bit Production on Wednesday, 10 October, 2012 16:00:06
 
Copyright (c) 2003, 2007, Oracle.  All rights reserved.
 
Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
Master table "SYS"."SYS_IMPORT_FULL_01" successfully loaded/unloaded
Starting "SYS"."SYS_IMPORT_FULL_01":  "/******** AS SYSDBA" DIRECTORY=DIR_DP DUMPFILE=history_active_201209.dmp logfile=history_active_201209.log REMAP_SCHEMA=query_org_tlbb:actv remap_tablespace=QUERY_ORG_TLBB_DATA:ACTV_TABLESPACE_DATA
Processing object type TABLE_EXPORT/TABLE/TABLE
Processing object type TABLE_EXPORT/TABLE/TABLE_DATA
. . imported "ACTV"."HISTORY_ACTIVE_201209"              4.894 GB 120522353 rows
Processing object type TABLE_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
Job "SYS"."SYS_IMPORT_FULL_01" successfully completed at 16:03:21

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/26390465/viewspace-1793122/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/26390465/viewspace-1793122/

你可能感兴趣的:(ORA-39142)