ORACLE9中存储过程在ORACLE8中报错误 ORA-06505
我在存储过程中用到CLOB字段,在PL-SQL中定义了一个varchar2(32766)的变量去取它,CLOB中值的长度肯定不超过32766,可是报错误
ORA-06505: PL/SQL: variable requires more than 32767 bytes of contiguous memory
找到这个资料,发现并没有番这个错误,不知为何?
Cause: A PL/SQL variable was declared with a constraint which required more than 32767 bytes of memory. PL/SQL does not currently support allocations of contiguous memory greater than 32767 bytes.
Action: Consider reducing the constraint in the variable declaration. If that is not possible, try changing the database or national character set to such, that requires less memory for the same constraint. Note: changing the character set will impact execution of all PL/SQL code.
问题点数:50、回复次数:6Top
1 楼logzgh(好好学习!)回复于 2004-04-05 09:21:34 得分 0
试试把32766再减小一些,另外你那clob是通过什么方法取给varchar2 的呢?
Top
2 楼yuepengfei(白开水)回复于 2004-04-05 09:28:41 得分 15
把变量的大小改一下(改小一点)Top
3 楼beibeilong9166(贝贝龙)回复于 2004-04-05 09:58:42 得分 0
已经减半了 varchar2(16383);
用lob包里面的 read方法呀!
谢谢你们!Top
4 楼nicholaz(九思·逢尤)回复于 2004-04-05 11:16:36 得分 20
VARCHAR(2)最多4000字符;你定义的太长Top
5 楼beibeilong9166(贝贝龙)回复于 2004-04-05 19:50:34 得分 0
varchar2(16383),这个是在pl/sql中定义的,在ql/sql中最长可为varchar2(32767),
我想这个是不是oracle8不支持的原因?
Top
6 楼beckhambobo(beckham)回复于 2004-04-05 22:47:32 得分 15
varchar2最大只能4000,怎么可能定义到16383长度Top




