在使用低版本impdp导入高版本导出的文件时,会报ORA-39142: incompatible version number 2.1 in dump file错误。
可以先导入高版本库中,然后再加VERSION参数导出,最后就可以导入低版本库中。
1,在10.2.0.1.0导入
1.1 版本
[bnet@bnet95 reports]$ sqlplus bnet/obss
[bnet@bnet95 reports]$ sqlplus bnet/obss
SQL*Plus: Release 10.2.0.1.0 - Production on Wed Oct 12 20:17:59 2016
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
SQL> select * from v$version;
BANNER
----------------------------------------------------------------
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Prod
PL/SQL Release 10.2.0.1.0 - Production
CORE 10.2.0.1.0 Production
TNS for Linux: Version 10.2.0.1.0 - Production
NLSRTL Version 10.2.0.1.0 - Production
----------------------------------------------------------------
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Prod
PL/SQL Release 10.2.0.1.0 - Production
CORE 10.2.0.1.0 Production
TNS for Linux: Version 10.2.0.1.0 - Production
NLSRTL Version 10.2.0.1.0 - Production
1.2 尝试导入
[bnet@bnet95 reports]$ impdp userid=bnet/obss@bnet directory=TEST_DIR dumpfile= EXP_TRANS_COUNTER.DMP logfile= exp_trans_counter.log parallel=8 TRANSFORM=segment_attributes:n remap_schema= misecif:bnet sqlfile=a.sql
[bnet@bnet95 reports]$ impdp userid=bnet/obss@bnet directory=TEST_DIR dumpfile= EXP_TRANS_COUNTER.DMP logfile= exp_trans_counter.log parallel=8 TRANSFORM=segment_attributes:n remap_schema= misecif:bnet sqlfile=a.sql
Import: Release 10.2.0.1.0 - Production on Wednesday, 12 October, 2016 20:05:36
Copyright (c) 2003, 2005, Oracle. All rights reserved.
Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
ORA-39001: invalid argument value
ORA-39000: bad dump file specification
ORA-39142: incompatible version number 2.1 in dump file "/home/bnet/reports/EXP_TRANS_COUNTER.DMP"
With the Partitioning, OLAP and Data Mining options
ORA-39001: invalid argument value
ORA-39000: bad dump file specification
ORA-39142: incompatible version number 2.1 in dump file "/home/bnet/reports/EXP_TRANS_COUNTER.DMP"
1.3 相关参数
[bnet@bnet95 reports]$ impdp help=y
VERSION Version of objects to export where valid keywords are:
(COMPATIBLE), LATEST, or any valid database version.
Only valid for NETWORK_LINK and SQLFILE.
[bnet@bnet95 reports]$ impdp help=y
VERSION Version of objects to export where valid keywords are:
(COMPATIBLE), LATEST, or any valid database version.
Only valid for NETWORK_LINK and SQLFILE.
[bnet@bnet95 reports]$ expdp help=y
VERSION Version of objects to export where valid keywords are:
(COMPATIBLE), LATEST, or any valid database version.
2,在11.2.0.3.0导入
2.1 版本
[bnet@ZD3DD603:/bnet/reports]$ sqlplus bnet/bnet
[bnet@ZD3DD603:/bnet/reports]$ sqlplus bnet/bnet
SQL*Plus: Release 11.2.0.3.0 Production on Thu Nov 19 20:19:11 2015
Copyright (c) 1982, 2011, Oracle. All rights reserved.
Con