All Questions
36 questions
0
votes
1
answer
654
views
Db2 stored procedure returns either empty result set or show "No suitable driver found" error
I am totally got stuck on this DB2 stored procedure & java routine thing and would like to ask and see if anybody see some similar and get a solution for it. Basically, I am trying to write some ...
1
vote
1
answer
219
views
Where to find DB2 Java Stored procedure system output?
A Java program is bundled into a jar and deployed to DB2. It's deployed as stored procedure and it works fine.
The question is: where would we look for messages output via System.out.println("...
0
votes
1
answer
471
views
Java stored procedure or user-defined function could not call Java method
After I created a Java external stored procedure in DB2 as in my previous question, the call
call user1.send_mail(
P_TO => '[email protected]'
,P_CC => NULL
,P_BCC =&...
1
vote
2
answers
2k
views
DB2 EXTERNAL STORED PROCEDURE(JAVA)
I been trying my luck to call a java jar file which has a method that takes String and boolean as input parameters.
The stored procedure is as below:
CREATE PROCEDURE TBF_STG.PROC( IN in1 VARCHAR(25), ...
0
votes
0
answers
911
views
Spring boot Hibernate call stored procedure error "Cannot get the describe information"
I'm trying to call a DB2 stored procedure, but I keep getting the following error:
Hibernate: {call MYSPNAME(?,?,?)}
2020-03-18T18:14:53,707 WARN [http-nio-8080-exec-1] SqlExceptionHelper id= marker=...
0
votes
1
answer
713
views
Associate allocate cursor result set question
I'm trying to run this code I found in this link: http://www.sqlines.com/db2-to-oracle/process_result_sets_in_procedures
I'm pretty sure when I run my stored procedure, it returns the values I need, ...
0
votes
0
answers
593
views
How to resolve exception attempting to load java class in DB2 Java Stored procedure?
I have created Java.sqlj program and done with creating packages and jar, when attempting to call the procedure, facing the error like
ATTEMPTING TO LOAD JAVA CLASS s1.S1Sal ...
-1
votes
1
answer
301
views
What is oracle equivalent for SYSPROC.ADMIN_TASK_ADD()
I have an existing SQL for scheduling admin task in DB2. It uses call SYSPROC.ADMIN_TASK_ADD(10 arguments). One of the argument is the input to procedure which will be called by this scheduled task.
...
0
votes
1
answer
529
views
Privileges required in a Db2 Java stored procedure
I'm creating a Java stored procedure in Db2.
I'm aware that whomever calls the procedure needs to be granted the 'execute' permission on the procedure.
However, which permissions are required for the ...
1
vote
0
answers
380
views
Hibernate + Db2 + StoredProcedure call, pass NULL value
Is it possible to pass a null value in a stored procedure call using Hibernate and Javax.Persistence?
I'm trying to do it in this way:
StoredProcedureQuery storedProcedure = em....
0
votes
1
answer
3k
views
Data truncation error while setting INOUT parameter in Stored Procedure
I'm calling a stored procedure which has INOUT parameters. Database is AS400 DB2. Type is CHARACTER. I'm getting Data Truncation error while registering and setting the variable. If I set the string ...
0
votes
1
answer
991
views
DB2 specific Stored Procedure tesing in JUnit
Any Framework/Tool for testing the stored procedures by using JUnit?
Working on to write the JUnit tests for Stored Procedure used in DB2 ddl file
The Stored procedure just having some SQL queries ...
0
votes
1
answer
2k
views
SQLCODE: -3015 when calling stored procedure
I have a stored procedure as follow:
CREATE OR REPLACE PROCEDURE "SMEADM"."COPY_TABLE_WITH_FILTER"
(IN IN_SOURCE_TABLE_NAME VARCHAR(50), IN IN_DEST_TABLE_NAME VARCHAR(50), IN IN_WHERE_CONDITION ...
0
votes
1
answer
2k
views
Using SimpleJdbcCall with Array as IN parameter (DB2)
I have created a stored procedure with Array of ROW type as IN parameter and able to call it using JDBC (Java 1.6)
Code is below
//Create Array Product List
Struct[] productList = new Struct[1];
...
0
votes
1
answer
2k
views
Parameter type not valid, stored procedure call IBM DB2
I am trying to invoke a stored procedure from IBM DB2 database with Java code, This is the callable statement:
CallableStatement cstmt = null;
ResultSet resultSet = null;
BigDecimal bg1;
bg1 = new ...