如何查看Oracle中的错误?
尝试在 Oracle 中执行包含两个输入参数的存储过程时出现以下错误:
ORA-06550: 第 1 行,第 7 列:
PLS-00306:调用
时参数的数量或类型错误 'P_GET_NEXT_AVAILABLE_RUN'
ORA-06550: 第 1 行,第 7 列:
PL/SQL:语句被忽略
两个输入参数都需要非空值。我无法单步执行代码,否则我将能够看到哪个值为空 - 那么 - Oracle 中有没有一种方法可以让你看到存储过程生成的错误 - 这样我就可以确定哪个参数正在获取空值?
I am getting the following error when trying to execute a stored procedure in Oracle that contains two input parameters:
ORA-06550: line 1, column 7:
PLS-00306: wrong number or types of arguments in call to
'P_GET_NEXT_AVAILABLE_RUN'
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored
Both input parameters require values that are not null. I can't step through the code, otherwise I would be able to see which value is null - so - is there a way in Oracle where you can see the errors generated by a stored procedure - so I can determine which parameter is getting the null value?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
该错误与空值无关 - PLS 部分说明正在使用的是:
它可能是任一,或两者的组合。
你能不能使用
DBMS_OUTPUT
来打印什么查询&正在尝试参数,以便您可以与正在调用的存储过程的参数进行比较?The error isn't about nulls - the PLS portion spells out that what is being used is:
It could be either, or a combination of both.
Can you not use
DBMS_OUTPUT
to print what query & arguments are being attempted so you can compare to the arguments of the stored procedure being called?可以修改一下程序吗?您可以允许空值并以编程方式拒绝它们。
或者,您可以使用另一个检查参数的过程来包装您的过程,然后调用有问题的过程。
Can you modify the procedure? You could allow nulls and programmatically reject them.
Or you could wrapper your procedure with another that checks the arguments and then calls the problematic one.