home clear 64x64
en blue 200x116 de orange 200x116 info letter User
suche 36x36
Latest versionsfixlist
11.1.0.7 FixList
10.5.0.9 FixList
10.1.0.6 FixList
9.8.0.5 FixList
9.7.0.11 FixList
9.5.0.10 FixList
9.1.0.12 FixList
Have problems? - contact us.
Register for free anmeldung-x26
Contact form kontakt-x26

DB2 - Problem description

Problem IC95790 Status: Closed

CALLING A SQL STORED PROCEDURE AFTER MIGRATION FAILS WITH EITHER AN SQL1224
OR SQL0471 ERROR IT MAY ALSO TRAP

product:
DB2 FOR LUW / DB2FORLUW / A10 - DB2
Problem description:
When calling certain SQL procedures in DB2 Version 10.1 you may 
encounter an unexpected SQL error: 
 
In DB2 Version 10.1.0.2 a SQL1224N error may occur.  Under DB2 
Versions 10.1.0.0 or 10.1.0.1, you may see the following 
unexpected error instead: 
 
SQL0471N  Invocation of routine "MYSCHEMA.MYPROC" failed due to 
reason "1".  SQLSTATE=55023 
 
The procedure call may also trap in the insertTraceRecord/ 
topLevelCleanup functions. 
 
For the errors or the trap to occur, the called SQL procedure 
must satisfy the following conditions: 
 
- The procedure must have originally been created under DB2 
Version 8.2, then migrated to Version 9.1, 9.5, or 9.7, before 
being 
migrated to Version 10.1. 
 
- The procedure contains at least one WITH RETURN cursor that is 
not used in the routine and not even opened.  In other words, 
the 
procedure declares the cursor, but does not use it in any other 
statements.
Problem Summary:
**************************************************************** 
* USERS AFFECTED:                                              * 
* Users of SQL routines that are in a database originally      * 
* created on version 8.2                                       * 
**************************************************************** 
* PROBLEM DESCRIPTION:                                         * 
* See Error Description                                        * 
**************************************************************** 
* RECOMMENDATION:                                              * 
* Upgrade to DB2 Version 10.1 Fix Pack 4.                      * 
****************************************************************
Local Fix:
Drop and recreate the failing procedure in DB2 Version 10.1. 
 
In order to identify additional routines that may be affected by 
this problem, please run one of the following queries: 
 
On little-endian platforms (e.g., Windows, Linux AMD64): 
 
select R.routineschema, R.routinemodulename, 
  R.routinename, R.specificname 
  from syscat.routines R, sysibm.syscodeproperties CP 
  where R.implementation like 'db2pvm%' 
  and CP.lib_id = R.lib_id 
  and bitand(ascii(cast(substr(CP.sql_compiled_code, 53, 1) 
   as char(1) for bit data)), 4) <> 0 
 
On big-endian platforms (e.g., AIX): 
 
select R.routineschema, R.routinemodulename, 
  R.routinename, R.specificname 
  from syscat.routines R, sysibm.syscodeproperties CP 
  where R.implementation like 'db2pvm%' 
  and CP.lib_id = R.lib_id 
  and bitand(ascii(cast(substr(CP.sql_compiled_code, 56, 1) 
   as char(1) for bit data)), 4) <> 0 
 
Drop and recreate each identified routine.
available fix packs:
DB2 Version 10.1 Fix Pack 4 for Linux, UNIX, and Windows
DB2 Version 10.1 Fix Pack 6 for Linux, UNIX, and Windows

Solution
First Fixed in Version 10.1 Fix Pack 4.
Workaround
Drop and recreate the effected routine
BUG-Tracking
forerunner  : APAR is sysrouted TO one or more of the following: IC95897 
follow-up : 
Timestamps
Date  - problem reported    :
Date  - problem closed      :
Date  - last modified       :
06.09.2013
07.07.2014
07.07.2014
Problem solved at the following versions (IBM BugInfos)
Problem solved according to the fixlist(s) of the following version(s)
10.1.0.4 FixList