Fixes are available
DB2 Version 9.5 Fix Pack 3b for Linux, UNIX, and Windows
DB2 Version 9.5 Fix Pack 1 for Linux, UNIX, and Windows
DB2 Version 9.5 Fix Pack 2a for Linux, UNIX, and Windows
DB2 Version 9.5 Fix Pack 2 for Linux, UNIX, and Windows
DB2 Version 9.5 Fix Pack 4 for Linux, UNIX, and Windows
DB2 Version 9.5 Fix Pack 3a for Linux, UNIX, and Windows
DB2 Version 9.5 Fix Pack 3 for Linux, UNIX, and Windows
DB2 Version 9.5 Fix Pack 4a for Linux, UNIX, and Windows
DB2 Version 9.5 Fix Pack 5 for Linux, UNIX, and Windows
DB2 Version 9.5 Fix Pack 6a for Linux, UNIX, and Windows
DB2 Version 9.5 Fix Pack 7 for Linux, UNIX, and Windows
DB2 Version 9.5 Fix Pack 8 for Linux, UNIX, and Windows
DB2 Version 9.5 Fix Pack 9 for Linux, UNIX, and Windows
DB2 Version 9.5 Fix Pack 10 for Linux, UNIX, and Windows
APAR status
Closed as program error.
Error description
A positioned update or delete fails with SQL0509N if a cursor is opened against alias and update or delete against base table. The following steps illustrates the -509 scenario. . db2 create table S1.T1 (C1 int, C2 char(10)) db2 insert into S1.T1 values(1,'a') db2 create alias S2.A2 for S1.T1 db2 +c declare CUR1 cursor for select C2 from S2.A2 where C1=1 for update db2 +c open CUR1 db2 +c fetch CUR1 db2 +c update S1.T1 set c2='1' where current of CUR1 . SQL0509N The table specified in the UPDATE or DELETE statement is not the same table specified in the SELECT for the cursor. SQLSTATE=42827 . The same problem can occur using the IBM DB2 Driver for JDBC with updatable ResultSets: . Statement stmt = con.createStatement( ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_UPDATABLE ); ResultSet rs = stmt.executeQuery( "SELECT C2 FROM S2.A2 WHERE C1=1" ); while (rs.next()) { rs.updateString( "C2","1" ); }
Local fix
none. Jcc driver can use views for positioned updates.
Problem summary
see problem description
Problem conclusion
First fixed in DB2 UDB Version 9.5, FixPak 1
Temporary fix
Comments
APAR Information
APAR number
IZ08035
Reported component name
DB2 UDB WSE AIX
Reported component ID
5765F3500
Reported release
950
Status
CLOSED PER
PE
NoPE
HIPER
NoHIPER
Special Attention
NoSpecatt
Submitted date
2007-11-06
Closed date
2008-05-29
Last modified date
2008-05-29
APAR is sysrouted FROM one or more of the following:
APAR is sysrouted TO one or more of the following:
Fix information
Fixed component name
DB2 UDB WSE AIX
Fixed component ID
5765F3500
Applicable component levels
R910 PSY
UP
R950 PSY
UP
Document Information
Modified date:
01 October 2021