暂无图片
暂无图片
暂无图片
暂无图片
暂无图片

oracle使用dblink impdp数据时报错ORA-39169

原创 Leo 2022-12-10
1719

问题描述:oracle使用dblink impdp数据时报错ORA-39169,如下所示:

源  端:oracle 10.2.0.4 64位 + oel 5.11 64位

目标端:oracle 19.16 64位 + centos 7.9 64位

1、异常重现

[oracle@leo-19c-ogg ~]$ nohup impdp system/oracle_4U@SIMDB directory=EXPDP_DIR version=10.2.0.4 NETWORK_LINK=ORCL_LINK flashback_scn=2478277 exclude=statistics parallel=4 schemas=SCOTT logfile=impdp_scott.log logtime=ALL TRANSFORM=DISABLE_ARCHIVE_LOGGING:Y &

 

[oracle@leo-19c-ogg ~]$ tail -5000f nohup.out

 

Import: Release 19.0.0.0.0 - Production on Sat Dec 10 18:30:04 2022

Version 19.16.0.0.0

 

Copyright (c) 1982, 2019, Oracle and/or its affiliates.  All rights reserved.

 

Connected to: Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production

ORA-39001: invalid argument value

ORA-39169: Local version of 19.16.0.0.0 cannot work with remote version of 10.2.0.4.0.

2、异常原因

oracle 10.2.0.4通过dblink无法与oracle 19.16进行远程通讯.

3、解决方案

采用直接导入导出的方式.

3.1、源端操作

[oracle@leo-10g-ogg ogg]$ export NLS_LANG=AMERICAN_AMERICA.AL32UTF8

[oracle@leo-10g-ogg ogg]$ exp scott/tiger@orcl file=/home/oracle/scott.dmp tables=dept,emp rows=y log=/home/oracle/exp.log

 

Export: Release 10.2.0.4.0 - Production on Sun Dec 10 18:48:24 2022

 

Copyright (c) 1982, 2007, Oracle.  All rights reserved.

 

 

Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production

With the Partitioning, OLAP, Data Mining and Real Application Testing options

Export done in AL32UTF8 character set and AL16UTF16 NCHAR character set

 

About to export specified tables via Conventional Path ...

. . exporting table                           DEPT          4 rows exported

. . exporting table                            EMP         14 rows exported

Export terminated successfully without warnings.

 

将源端dmp文件scp到目标端.

[oracle@leo-10g-ogg ~]$ scp scott.dmp oracle@192.168.133.109:/home/oracle/

3.2、目标端操作

--创建用户并授予权限

sys@SIMDB 2022-12-10 19:28:54> create user scott identified by tiger;

 

User created.

 

sys@SIMDB 2022-12-10 19:35:11> grant connect,resource to scott;

 

Grant succeeded.

 

sys@SIMDB 2022-12-10 19:37:28> alter user scott quota unlimited on users;

 

User altered.

--导入测试数据

[oracle@leo-19c-ogg ~]$ export NLS_LANG=AMERICAN_AMERICA.AL32UTF8

[oracle@leo-19c-ogg ~]$ imp scott/tiger file=/home/oracle/scott.dmp full=y

 

Import: Release 19.0.0.0.0 - Production on Sat Dec 10 19:40:01 2022

Version 19.16.0.0.0

 

Copyright (c) 1982, 2019, Oracle and/or its affiliates.  All rights reserved.

 

 

Connected to: Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production

Version 19.16.0.0.0

 

Export file created by EXPORT:V10.02.01 via conventional path

import done in AL32UTF8 character set and UTF8 NCHAR character set

export server uses AL16UTF16 NCHAR character set (possible ncharset conversion)

. importing SCOTT's objects into SCOTT

. importing SCOTT's objects into SCOTT

. . importing table                         "DEPT"          4 rows imported

. . importing table                          "EMP"         14 rows imported

About to enable constraints...

Import terminated successfully without warnings.

「喜欢这篇文章,您的关注和赞赏是给作者最好的鼓励」
关注作者
【版权声明】本文为墨天轮用户原创内容,转载时必须标注文章的来源(墨天轮),文章链接,文章作者等基本信息,否则作者和墨天轮有权追究责任。如果您发现墨天轮中有涉嫌抄袭或者侵权的内容,欢迎发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。

评论