如何查看Oracle中的错误?

发布于 2024-08-18 07:51:17 字数 320 浏览 4 评论 0原文

尝试在 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

倥絔 2024-08-25 07:51:17

该错误与空值无关 - PLS 部分说明正在使用的是:

  • 提供错误数量的参数 - 小于或大于预期数量
  • 提供的值的数据类型与参数不匹配

它可能是任一,或两者的组合。

你能不能使用DBMS_OUTPUT来打印什么查询&正在尝试参数,以便您可以与正在调用的存储过程的参数进行比较?

The error isn't about nulls - the PLS portion spells out that what is being used is:

  • Providing the wrong number of arguments - less or greater than the number expected
  • The data type of the provided values doesn't match the arguments

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?

小帐篷 2024-08-25 07:51:17

可以修改一下程序吗?您可以允许空值并以编程方式拒绝它们。

或者,您可以使用另一个检查参数的过程来包装您的过程,然后调用有问题的过程。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文