重庆思庄Oracle、Redhat认证学习论坛

标题: ORA-28513: internal error in heterogeneous remote agent When Numeric Value is... [打印本页]

作者: 刘泽宇    时间: 2024-8-4 14:14
标题: ORA-28513: internal error in heterogeneous remote agent When Numeric Value is...
现象:
Installed Oracle Database 12.2.0.1 and Oracle Database Gateway for ODBC 12.2.0.1 accessing  Attunity database using Attunity ODBC driver
The queries returning NUMBER are failing with ORA-28513, for example:



SQL> desc <table>@dblink;                                                              <-- no numeric values
Name Null? Type
-------------------------------- -------- -------------------------------------------------
COl1      NOT NULL  CHAR(2)
COl2      NOT NULL  CHAR(30)
COl3      NOT NULL  CHAR(3)
COl4      NOT NULL  CHAR(10)
COl5      NOT NULL  CHAR(6)
COl6      NOT NULL  CHAR(8)
COl7      NOT NULL  CHAR(30)

SQL> select * from <table>@dblink where rownum < 2;                        <-- works as expected
COL1    COL2  COL3  COL4     COL5        COL6   COL7
-- ------------------------------ ---    ---------- ------ -------- ------------------------------
XX  SXXXXXY XXX    XXX324 XXXXX363 XXXXX

SQL> select count(*) from <table>@dblink;                                       <-- numeric value is returned for the count
select count(*) from <table>@dblink
*
ERROR at line 1:
ORA-28513: internal error in heterogeneous remote agent
ORA-02063: preceding line from DBLINK


The gateway trace file shows the difference.

121:
Entered hgodscr, cursor id 1 at 2019/03/05-14:18:33
Allocate hoada @ 0x1b81f00
Entered hgodscr_process_sellist_description at 2019/03/05-14:18:33
Entered hgopcda at 2019/03/05-14:18:33
Column:1($$CALC_1): dtype:2 (NUMERIC), prc/scl:19/0, nullbl:1, octet:0, sign:1, radix:0
Exiting hgopcda, rc=0 at 2019/03/05-14:18:33
hgodscr, line 470: Printing hoada @ 0x1b81f00
MAX:1, ACTUAL:1, BRC:100, WHT=5 (SELECT_LIST)
DTY NULL-OK LEN MAXBUFLEN PR/SC CST IND MOD NAME
3 DECIMAL Y 21 21 19/ 0 0 0 0 $$CALC_1
Exiting hgodscr, rc=0 at 2019/03/05-14:18:33

122:
Entered hgodscr, cursor id 1 at 2019/03/05-14:14:35
Allocate hoada @ 0x1fd2520
Entered hgodscr_process_sellist_description at 2019/03/05-14:14:35
Entered hgopcda at 2019/03/05-14:14:35
Column:1($$CALC_1): dtype:2 (NUMERIC), prc/scl:19/0, nullbl:1, octet:0, sign:1, radix:0
Exiting hgopcda, rc=0 at 2019/03/05-14:14:35
hgodscr, line 493: Printing hoada @ 0x1fd2520
MAX:1, ACTUAL:1, BRC:100, WHT=5 (SELECT_LIST)
DTY NULL-OK LEN MAXBUFLEN PR/SC CST IND MOD NAME
2 NUMERIC Y 21 21 19/ 0 0 0 0 $$CALC_1
Exiting hgodscr, rc=0 at 2019/03/05-14:14:35







原因:
Columns defined as SQL_NUMERIC or with a type that maps to that, will error out

Doing a select in a table with a SQL_NUMERIC column or a type that maps to SQ_NUMERIC. If you get a "Invalid C-datatype" error message, you had encountered this problem

处理方法:
Apply the patch for Bug 28248841






欢迎光临 重庆思庄Oracle、Redhat认证学习论坛 (http://bbs.cqsztech.com/) Powered by Discuz! X3.2