PLS-00123 program too large

plsql的一个package中
我在函数中声明了
REC_KOSHIN TABLE_A%ROWTYPE;
REC_KOSHIN1 TABLE_A%ROWTYPE;
REC_KOSHIN2 TABLE_A%ROWTYPE;
REC_KOSHIN3 TABLE_A%ROWTYPE;
REC_KOSHIN4 TABLE_A%ROWTYPE;
REC_KOSHIN5 TABLE_A%ROWTYPE;
编译成功

再多声明一个就编译出错(PLS-00123)

为什么?怎么解决?请教了

---------------------------------------------------------------

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.

---------------------------------------------------------------

这个另一个方法就是把大的过程分解成几个小的过程。a-->b,c
在b过程里面把中间使用到的数据放到临时表里面,然后在c过程里面使用这些数据,处理后最终得到结果。
---------------------------------------------------------------

你的package太大了,采用第一个办法来缩小吧,比如把一些内容转移到包外的函数中。

Published At
Categories with 数据库类
Tagged with
comments powered by Disqus