Failed to execute a stored procedure in another database?

Stored procedure that works fine on a development database but fails on a production database? Returned error: "PLS-00306: Invalid number or types of arguments when called <procedure naeme>

"

VC ++ oracle database

Closed: An error occurred due to an invalid synonym.

0


source to share


2 answers


This error has nothing to do with a problem in the procedure you are performing. This error has to do with the way you are calling it in one database versus another. It is the caller in DEV that sends the correct combination of parameters and parameter types. The logic that ultimately calls the procedure in PROD sends a different combination of parameters.

First check the procedure specification in both databases to make sure it is REALLY the same. Look for differences in parameters, data types, or any NULL DEFAULT differences or the like.

Then check the logic that calls the actual procedure between databases. Usually it will be missing one of the parameters or the data type will be incorrect. The order of your parameters is also important if you are not using named conventions.



If you are ultimately sure that everything is the same, then it is possible that the data is associated with one of the parameters in the system, and that your C ++ drivers do not call the procedure in the same way.

This is a hard and clear mistake, and it tells you that there is ultimately some difference in what it is called. Good luck.

0


source


You should provide additional information. At least these "base" datatypes (NUMBER, DATE, VARCHAR2, etc.) Or do you have exotic (XMLTYPE, geo, custom types?) Use SQL * Plus, connect to schema in both databases and do DESC Publish the results so we can see them.



0


source







All Articles