需要把生产环境的某张表,使用expdp导出,然后使用impdp倒进本地测试环境的另一个用户下,在导入的时候报错ORA-39166:
下面具体操作过程:
首先在源端expdp出来,这里我们按着时间条件导出来的,并且由于我的测试环境是11.2.0.1.0,但是源端11.2.0.4.0,目标端版本底,所以需要使用参数version。
[oracle@oracle3 ~]$ expdp liuwenhe/liuwenhe directory=DATA_MIG_DIR tables=INFOSERVICE.t_publish_info dumpfile=t_publish_info09.dmp query=\"where publish_date\>\=to_date\(\'2016-09-01\',\'yyyy-mm-dd\'\) and publish_date\<\to_date\(\'2016-10-01\',\'yyyy-mm-dd\'\) \" version=11.2.0.1.0
然后通过sftp传到跳板机
[liuwenhe@S220 ~]$ sftp root@192.168.0.214
Connecting to 192.168.0.214...
Address 192.168.0.214 maps to localhost, but this does not map back to the address - POSSIBLE BREAK-IN ATTEMPT!