views:

59

answers:

2

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?

A: 

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.

DCookie
+5  A: 

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?

OMG Ponies