加载中…
个人资料
孙成子子
孙成子子
  • 博客等级:
  • 博客积分:0
  • 博客访问:5,481
  • 关注人气:31
  • 获赠金笔:0支
  • 赠出金笔:0支
  • 荣誉徽章:
正文 字体大小:

oracle_ORA-600[HO define: Long fetch] fetch data from sqlserv

(2013-05-27 09:49:26)
标签:

oracle

600

it

分类: oraerror

Applies to:

Oracle Database Gateway for SQL Server - Version 11.1.0.6 to 11.2.0.1 [Release 11.1 to 11.2]
Information in this document applies to any platform.

Symptoms


The following error message is received when making a select using an Oracle Database Gateway (such as Dg4ODBC, DG4MSQL) with third party tools such as PL/SQL Developer or Toad for Oracle  -


select * from table_name@dblink ;

ORA-00600. Internal Error Code, Arguments: [HO define: Long fetch], [], [], [], [], [], [], []


The problem can also happen when using Oracle software.

Cause


The ORA-600 can happen for several reasons, the root cause of the error with the third party applications depends on the table being selected.

1. The table description contains 2 long or long raw columns , for example -

CURRENCEYDATA              LONG RAW
MEMO                             LONG

 2. The non-Oracle table has a column defined as var(max).

In Oracle there are limitations with LONG columns:
A table can contain only one LONG column.  

oracle表中只允许有一个LONG列字段。可以用函数进行截取。

See  Note 463115.1 Restrictions on LONG Datatype

Solution


The root cause of the ORA-600 error with the third party applications depends on the table being selected and certain applications will cause an ORA-600.
The workround is -

1. Create a view on the SQL Server or Oracle side avoiding a select of more than one long/long raw column at the same time. 

2. Specify the select list  to make sure only one long or long raw column is fetched at the same time.

3. Create a view on the non-Oracle database that truncates columns to 4000 characters or less. 
For example on SQL*Server -

CREATE VIEW view_log_bis AS SELECT
( ID,
LogTime,
Action,
InstID,
Username,
Error,
SUBSTRING (Parm1,1 ,4000) as Parm1_4000 ,
SUBSTRING (Parm1,4001,8000)as Parm1_8000,
SUBSTRING (Parm1,8001,12000) as Parm1_12000,
SUBSTRING (Parm1,12001,16000) as Parm1_16000,
Cert
FROM view_log;

 

4. Use a view on SQL Server to cast the var(max) columns to another data type.

5. Use Oracle tools instead of third-party tools.

0

阅读 收藏 喜欢 打印举报/Report
  

新浪BLOG意见反馈留言板 欢迎批评指正

新浪简介 | About Sina | 广告服务 | 联系我们 | 招聘信息 | 网站律师 | SINA English | 产品答疑

新浪公司 版权所有