Skip to main content

All Questions

Tagged with
0 votes
0 answers
69 views

Query taking too long to fetch results

When I try running the stored procedure with only this query: SELECT TAB1.COL6 FROM TAB1 INNER JOIN TAB2 ON TAB1.COL1 = TAB2.COL1 WHERE TAB1.COL2 = 10; It takes 5 seconds to get the resultset and if ...
Priyanka Sharma's user avatar
0 votes
2 answers
74 views

Dynamic SQL for DB2

The below SQL query is not fetching columns into v_columns. When I print v_columns it is NULL always SET v_sql = 'SELECT LISTAGG(COLNAME , '','') WITHIN GROUP (ORDER BY COLNO) INTO :v_columns ' || '...
Ganesh Manneedi's user avatar
0 votes
2 answers
76 views

Cannot drop DB2 stored procedure due to undefined name error

I have a stored procedure for DB2. I'm unable to drop the procedure. I'm getting the below error while executing the DROP PROCEDURE <PROCEDURE_NAME> command. Error: DB2 SQL Error: SQLCODE=-204, ...
Amrutha's user avatar
  • 19
0 votes
0 answers
46 views

Getting DB2 stored procedure output parameter using symfony and doctrine

I am refactoring plain PHP code in symfony (5) + doctrine my mode is something like: $sql = "CALL my_store_procedure (?, ?, ?, ?, ?)"; $stmt = db2_prepare($db, $sql); $p1 = "p1&...
Stefano Giusto's user avatar
0 votes
2 answers
182 views

IBMi SQL stored procedures - how to set comma / decimal point in numbers

I am working on IBMi where whole number and fraction is represented by comma instead of decimal point (eg: 123,45 instead of 123.45). This seem to be causing SQL functions to fail. Example: SUBSTR(...
mortimer's user avatar
0 votes
0 answers
116 views

Calling a stored procedure in DbVisualizer returns message : Invalid operation: result set is closed. ERRORCODE=-4470, SQLSTATE=null

I'm running DB2 LUW v11.5.9 on SLES 12.5 (zLinux). A new stored procedure BRL.LOONCIRCUIT_BTB_V2 has been created which is basically a copy of an existing SP BRL.LOONCIRCUIT_BTB, but with a change in ...
lazydba's user avatar
0 votes
0 answers
61 views

pyodbc DB2 global variable not found for stored procedure

We have to call a stored procedure on a DB2 database. Following the instructions from this ticket pyodbc python linux iSeriesAccess driver - stored procedure - capture output parameters? we have the ...
MitchE's user avatar
  • 1
-4 votes
1 answer
190 views

DB2 contention issues

We are experiencing serious performance degrades and sometimes outages due to DB2 contention issues. Covol DB2 batch program is having contentions with distributed threads from Stored procedures ...
user23568506's user avatar
0 votes
0 answers
70 views

SQL performance considerations when using 'case when' while updating a row

I have been investigating ways to create a DB2 SQL stored procedure (IBM iSeries) that updates a column based on few parameters. The parameters include column name (@columnname) to be updated, value (@...
Rishab Kaushik's user avatar
-1 votes
1 answer
216 views

wait for few seconds or minutes logic in db2 native sp

I want to implement logic to wait for a few seconds for the initial native DB2 SP to complete and then start the second native DB2 SP. The wait logic is needed because SP1 will insert data, and then ...
next2you's user avatar
0 votes
1 answer
200 views

db2 native SQL stored procedure

I am learning and new to db2. Here is what I am trying to achieve in steps: Step 1: create a stored procedure to insert data into the table, once inserted Step 2: run select on the same table, get ...
next2you's user avatar
0 votes
1 answer
422 views

SQL Error [42703]: "ILQASRC" is not valid in the context where it is used.. SQLCODE=-206, SQLSTATE=42703, DRIVER=4.31.10

Stored procedure not getting executed on DB2 luw via Dbeaver Application. I created a stored procedure under my schema 'ILQASRC' which exists in a DB2 luw database. The code of the procedure is as ...
aditya_1225's user avatar
0 votes
0 answers
390 views

ibm_db_dbi::ProgrammingError when calling a stored procedure with pandas read_sql_query

I am attempting to use pandas.read_sql_query to call a stored procedure in IBM's db2 and read the results into a dataframe. However when I do so, I receive the following error: ibm_db_dbi::...
neanderslob's user avatar
  • 2,703
0 votes
0 answers
540 views

How to handle error SQL0443N when using 'SYSPROC.ADMIN_GET_MSGS' in DB2?

I am trying to perform DB2 import/export by using JDBC. As the offical document suggests, I have to execute call sysproc.admin_cmd(import...messages on server...) first, then retrieve the messages ...
Moron9645's user avatar
1 vote
0 answers
93 views

Why is the Character output in out parameter getting substringed to some limit in DB2

I have created a stored procedure to call with some input parameters and get out related to that. The maximum limit of characters I have given 5000. But on calling the procedure the Output parameter ...
Aditya Kumar's user avatar

15 30 50 per page
1
2 3 4 5
35