Error- ORA-22835: Buffer too small for CLOB to CHAR or BLOB to RAW conversion

ε祈祈猫儿з 提交于 2019-12-01 00:05:08

问题


I am attempting to read a blob message and display it as a variable in one of my procedures, but am getting the error below:

Error - ORA-22835: Buffer too small for CLOB to CHAR or BLOB to RAW conversion (actual: 9923, maximum: 2000)

I have googled and found a suggestion to trim the blob message as below, but would rather display the complete blob message as a string.

UTL_RAW.CAST_TO_VARCHAR2(dbms_lob.substr(variable_name,2000,1)) 

How can I display the complete message? Is there a setting on either the database or procedure level that I can change?


回答1:


I got this worked by using the option described in

http://www.dba-oracle.com/t_convert_blob_varchar_datatype.htm




回答2:


Try to use DBMS_LOB.GETLENGTH(), instead of trimming the string



来源:https://stackoverflow.com/questions/25518780/error-ora-22835-buffer-too-small-for-clob-to-char-or-blob-to-raw-conversion

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!