不用子程序如何解决Oracle存储过程,函数或触发器行太多的问题?
我编写的程序大都是100行以上,最大可能超过400行或更多,如何处理才能使生成的存储过程有效,Oracle的存储过程,函数和触发器最大的行限制是多少?
(在Oracle 8.05)
以前我也写过几百行的程序,好象都没问题,但现在一个一百来行的存储过程,一直不能创建成功,错误提示为:
LINE/COL ERROR
-------- -----------------------------------------------------------
0/0 PLS-00707: unsupported construct or internal error [2603]
而且,在schema manager 中可以看到此存储过程,证明已经创建了,但status属性显示为:Invalid,不知道为什么。
首先,程序的语法绝对没有问题。
其次,编写一个短些的,62行的存储过程,编译创建成功。Status属性为:Valid.
我考虑了好久,觉得可能是Oracle安装的问题,但不知道问题到底出在那里?
存储过程几百行是非常常见的,我经常写长达上千行的package,也没碰到过你这样的错误。这个错误比较讨厌,下面是详细说明:
PLS-00707 unsupported construct or internal error [string]
Cause: At run time, this is an internal error. At compile time, it indicates one of the following problems:
- A call was made to a remote subprogram that has a parameter type or default expression not supported at the calling site.
- An incomplete upgrade or downgrade was done to a database that has
stored procedures. Perhaps incorrect versions of system packages such as STANDARD.SQL were installed.
- A compiler bug was encountered. In such cases, legal PL/SQL syntax will fail to compile.
Action: Either report the internal error to Oracle Customer Support or, depending on the problem, take one of the following actions:
- Revise the logic of the application to use parameter types and default expressions that are supported at both the local and remote sites.
- Complete the upgrade or downgrade properly, making sure to install
correct versions of all system packages.
- Report the legal-syntax error to Oracle Customer Support. If there are line and column numbers displayed with the error message, they might help you find a workaround. For example, try recoding the offending line to avoid the bug.
你把发生错误的行前后帖出来看看是什么内容