oracle PL/SQL:特定环境的“字符串缓冲区太小”错误
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/6200008/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
PL/SQL:"character string buffer too small" error for specific environment
提问by sergionni
Can't got the problem,that reproduced on my environment.
无法解决在我的环境中重现的问题。
Result of running PL/SQL procedure on my PCon Eclipse SQL Explorer
:
在我的 PC上运行 PL/SQL 过程的结果Eclipse SQL Explorer
:
ORA-06502: PL/SQL: numeric or value error: character string buffer too small
If this procedure compiled on other PCon Eclipse SQL Explorer
also,that all is OK.
如果此程序也编译在其他 PC上Eclipse SQL Explorer
,那一切都可以。
note:If you ask,why Eclipse SQl Explorer
- its' historical issue,because procedure isn't compiled under Oracle Sql Developer.
注意:如果你问,为什么Eclipse SQl Explorer
- 它的历史问题,因为过程不是在 Oracle Sql Developer 下编译的。
What is problem in my environment?
我的环境有什么问题?
Thank you.
谢谢你。
回答by APC
You need to look for a significant difference in the client environments. For instance, do they have different settings for NLS_LANG? This could matter if you're using a multi-byte character or Unicode character set in your database.
您需要在客户端环境中寻找显着差异。例如,他们对 NLS_LANG 有不同的设置吗?如果您在数据库中使用多字节字符或 Unicode 字符集,这可能很重要。
回答by Gary Myers
There's an optimization level for PL/SQL procedures. Could be one of your environments is compiling in 'normal' mode and the other in 'debug' mode.
PL/SQL 过程有一个优化级别。可能是您的环境之一在“正常”模式下编译,另一个在“调试”模式下编译。
Check the settings for that object in ALL_PLSQL_OBJECT_SETTINGS
检查 ALL_PLSQL_OBJECT_SETTINGS 中该对象的设置
回答by Klas Lindb?ck
Does your code use the DBMS_OUTPUT package? Maybe you have a small limit on DBMS_OUTPUT. Try and increase the size to the maximum allowed (32767).
您的代码是否使用 DBMS_OUTPUT 包?也许您对 DBMS_OUTPUT有一个小的限制。尝试将大小增加到允许的最大值 (32767)。