ORA-00600: internal error code, arguments: [kollasg:client-side tmp lob]

朋友的数据库alert警告日志文件里报ORA-00600: internal error code, arguments: [kollasg:client-sid tmp lob]
数据库版本是10.2.0.5,在mos上找到了一篇文章
ORA-00600 [kollasg:client-side tmp lob] Fetching Row With LOB Column in OCI Application (文档 ID 1418135.1)

APPLIES TO:
Oracle Database - Enterprise Edition - Version 11.1.0.6 and later
Information in this document applies to any platform.

SYMPTOMS
An OCI-based application compiled with the 11.1.0.7 client [connecting to 11.2 db] reading a CLOB field being fetched using OCISmtFetch2 fails with an ORA-00600 [kollasg:client-side tmp lob].

CAUSE
The CLOB field being fetched needs to be initialized, as when fetching a uninitialized LOB column (ie) without any LOB locator is causing the ORA 600 error.

SOLUTION
Initialize the CLOB field/column with empty_clob(), either on INSERT or after the row is inserted via an UPDATE.

官方解释是基于oci编译的应用程序通过客户端连接数据库,读取clob字段时会报这个错误,clob字段需要初始化,当获取一个未初始化的LOB值时会报ORA-600错误。

朋友说应用程序中确实有CLOB字段,这个是oracle使用oci时的一个对于空字段的clob的一个bug,解决方法就是针对为空的clob字段,插入空值时用empty_clob()处理。


请使用浏览器的分享功能分享到微信等