Cannot execute DB2 stored procedures [message #1767002] |
Thu, 29 June 2017 12:53 |
Roger Fulgham Messages: 1 Registered: June 2017 |
Junior Member |
|
|
When trying to execute a stored procedure in both Data Source Explorer and DBeaver i receive the following error: The parameter mode OUT or INOUT is not valid for a parameter in the routine named "TEST_CURSOR" with specific name "SQL170628083723930" (parameter number "2", name "HZ_KEY").. SQLCODE=-469, SQLSTATE=42886, DRIVER=4.19.49
After doing some research I found the following explanation on the IBM support page :
Error description
When calling stored procedures that resides
on DB2 v9.7 which contains an INOUT parameter from a V9.1 client
the following error is returned:
SQL0469N The parameter mode (IN, OUT, or INOUT) is not valid
for a parameter in procedure "proc1" with specific name "proc1"
(parameter number "1", name "IN1"). SQLSTATE=42886
Under the covers the DB2 CLP normally converts the constants
e.g. CALL PROC1('Hello') to parameter markers e.g.
CALL PROC1(?). In the case for v9.7 it is not doing this and
thus SQL0469 is returned.
Local fix
Problem summary
ERROR DESCRIPTION:
When calling stored procedures that resides
on DB2 Cobra (9.7) from V9.1 client, hits the error:
SQL0469N The parameter mode (IN, OUT, or INOUT) is not valid
for a parameter in procedure "proc1" with specific name "proc1"
(parameter number "1", name "IN1"). SQLSTATE=42886
The error is thrown when a SP containing inout parameters is
called from a v9.1 client. Because, parameter indexes in DB2
Cobra now starts from 1, not 0 as in previous releases.
Therefore, when the V9.1 client talks to V9.7 server, it needs
to use new parameter index map to map the mode of inout
parameters appropriately.
Problem conclusion
CALLING A STORED PROCEDURE ON A V9.7 SERVER FROM A V9.1 CLP
CLIENT HITS THE SQL0469 ERROR.
In my driver definitions for Eclipse, all of the available choices for DB2 drivers state they are using system version V9.1 and I can't seem to change them even though I am using a v10.5 driver. Is there any way to override the system version of the driver definition or create a new driver template using a newer system version?
I am using Eclipse Luna but have verified that the same thing occurs on Mars as well.
Thanks in advance for any help you can provide on this issue.
|
|
|
Powered by
FUDForum. Page generated in 0.03472 seconds