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 IC69493 Status: Closed

INSENSITIVE CURSOR DOES NOT RETURN ITS RESULT SET AFTER A TRUNCATE TABLE

product:
DB2 FOR LUW / DB2FORLUW / 970 - DB2
Problem description:
Insensitive cursors are meant to have all result sets computed 
at cursor open time and thus be insensitive to any changes to 
the content of the table after the opening of the cursor. 
 
 
Note that the Sybase skin implicitly uses INSENSITIVE cursors 
when the cursor is specified as 'with return' 
 
However this is not the case when the operation after the open 
of the cursor is a TRUNCATE.   Consider the following example: 
 
create global temporary table x.t1 (x int) 
insert into x.t1 values 1,2,3 
 
create procedure p1 () 
begin 
 declare c1 insensitive cursor with hold with return to client 
      for select x from x.t1; 
 open c1; 
 commit work; 
 truncate table x.t1; 
end 
 
 
call p1 () 
 
 
In this case rather than return the rows, the call p1() will 
return a -910 sqlcode when attempting to fetch from the result 
set.
Problem Summary:
**************************************************************** 
* USERS AFFECTED:                                              * 
* use of INSENSITIVE cursors and truncate table                * 
**************************************************************** 
* PROBLEM DESCRIPTION:                                         * 
* result set for cursor not returned                           * 
**************************************************************** 
* RECOMMENDATION:                                              * 
* upgrade to v97fp3                                            * 
****************************************************************
Local Fix:
Use a delete from table rather than a truncate
available fix packs:
DB2 Version 9.7 Fix Pack 3 for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 3a for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 4 for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 5 for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 6 for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 7 for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 8 for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 9 for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 9a for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 10 for Linux, UNIX, and Windows

Solution
Fixed in v97fp3
Workaround
not known / see Local fix
BUG-Tracking
forerunner  : APAR is sysrouted TO one or more of the following: IC69647 
follow-up : 
Timestamps
Date  - problem reported    :
Date  - problem closed      :
Date  - last modified       :
28.06.2010
19.12.2011
19.12.2011
Problem solved at the following versions (IBM BugInfos)
9.7.FP3
Problem solved according to the fixlist(s) of the following version(s)
9.7.0.3 FixList
9.7.0.3 FixList
9.7.0.4 FixList