expdp/impdp时候遇到ORA-39142

接到一个小任务,需要将一个表从测试数据库迁移到线上库,并且两个库上的表结构还有所不同,该表数据不大,只有58行,但是包含有clob字段,大概几百K

整个任务使用数据泵来实现,先在测试库将其导出

[oracle@testdb ~]$ expdp justin/*** directory=pump dumpfile=justin_tab.dmp  tables=justin_tab

使用sftp将其传输到生产库,尝试导入

[oracle@rac1 ~]$ impdp  justin/*** directory=pump dumpfile= justin_tab.dmp

但是却报一下错误

Import: Release 10.2.0.5.0 - 64bit Production on Tuesday, 23 November, 2010 14:22:00

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 2.1 in dump file "/data/oracle/pump/alliance_user_info.dmp"

根据提示,是dump文件的version不对,查看一下,测试库

SQL> show parameter compatible

 

NAME                                 TYPE        VALUE

------------------------------------ ----------- ------------------------------

compatible                           string      11.1.0.6

而生产库为

SQL> show parameter compatible;

 

NAME                                 TYPE        VALUE

------------------------------------ ----------- ------------------------------

compatible                           string      10.2.0.1.0

 

解决方案:

使用参数version重新导出该表

[oracle@testdb ~]$ expdp justin/*** directory=pump dumpfile=justin_tab.dmp  tables=justin_tab version=10.2.0.1.0

继续尝试导入生成库

[oracle@rac1 ~]$ impdp  justin/*** directory=pump dumpfile= justin_tab.dmp version=10.2.0.1.0

导入成功

 

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

转载于:http://blog.itpub.net/15480802/viewspace-679494/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值