PLS-00123:程序太大
来源:互联网 发布:屏幕录像专家 知乎 编辑:程序博客网 时间:2024/06/10 16:18
记得去年写了一个16000行左右的存储过程包,在pl/sql developer里编译时提示“PLS-00123:程序太大”的错误。只能在sql*plus里编译过去,而且编译后也可以正常使用。
当时认为错误提示很明显,程序写得太大了,但这个包里是一个整体的业务逻辑,没办法拆分。所以就这样用了。
今年做业务整合的时候,拆分了这个包,但仍出现该错误,此时才发现应该不是程序太大。而上个月我写过一个2000多行的case嵌套过程,也是提示这个错误。于是想到可能是嵌套的层次太多导致的。便一点点地删除代码进行查找,终于找到了产生问题的代码块。
我们看oracle对该错误的解释:
PLS-00123 program too large
Cause: PL/SQL was designed primarily for robust transaction processing. One consequence of the special-purpose design is that the PL/SQL compiler imposes a limit on block size. The limit depends on the mix of statements in the PL/SQL block. Blocks that exceed the limit cause this error.
Action: The best solution is to modularize the program by defining subprograms, which can be stored in an Oracle database. Another solution is to break the program into two sub-blocks. Have the first block INSERT any data the second block needs into a temporary database table. Then, have the second block SELECT the data from the table.
最后,我发现有些代码块的嵌套太多,之后将代码块拆分成几个子过程后,错误提示消失。
- PLS-00123:程序太大
- C++程序数组太大造成栈溢出
- android程序中界面太大太长太宽如何滚动?
- ATTENTION ,PLS
- PLS-00642
- PLS-00231
- PLS算法
- 世界太大
- C#程序数据量太大导致栈溢出Stack Overflow by big data
- 关于java web程序中数据包太大设置mysql 中max_allowed_packet变量值
- Oracle PLS-00455
- 存储过程PLS-00103
- pls 学习笔记(一)
- ORA-06550/PLS-00103
- pls:00201 00304
- ORA-12012 & PLS-00905
- set_sql_trace_in_session PLS-00201
- ora-06550 pls-00394
- CSDN心得,希望得到指导!
- hrbeu 第四次周赛简要题解
- 编写一个统计空格、制表符和换行符个数的程序
- mini2440移植之RTC驱动
- 快速排序算法
- PLS-00123:程序太大
- 神的编辑嚣emacs的简单配置
- 开源 P2P 直播 视频会议
- 抽象基类与接口,共性与个性的选择!
- Apache http server 的安装设置
- windows下配置mysql+php环境无法找到类mysqli
- 面向对象之抽象方法
- epoll笔记
- 单链表常见面试题