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

SQLEXECUTE OF "UPDATE ... WHERE CURRENT OF CURSOR-NAME" MIGHT
INCORRECTLY FAIL WITH ERROR SQL0519

product:
DB2 FOR LUW / DB2FORLUW / 970 - DB2
Problem description:
SQLExecute might incorrectly fail (return SQL_ERROR) when you 
pass it the statement handle for an 
"UPDATE ... WHERE CURRENT OF <cursor-name>" statement. If you 
then call SQLGetDiagRec it reports error SQL0519N. 
 
The problem happens if the "SELECT ... FOR UPDATE" statement 
associated with the cursor <cursor-name> 
has one isolation level and the "UPDATE .. WHERE CURRENT OF 
<cursor-name>" statement has a different isolation level set by 
using the SQL_ATTR_STMTTXN_ISOLATION or SQL_ATTR_TXN_ISOLATION 
statement handle attributes.
Problem Summary:
**************************************************************** 
* USERS AFFECTED:                                              * 
* Users of applications that use the CLI (Call Level           * 
* Interface) API with DB2 for Linux, UNIX and Windows          * 
**************************************************************** 
* PROBLEM DESCRIPTION:                                         * 
* SQLExecute might incorrectly fail (return SQL_ERROR) when    * 
* you                                                          * 
* pass it the statement handle for an                          * 
* "UPDATE ... WHERE CURRENT OF <cursor-name>" statement. If    * 
* you                                                          * 
* then call SQLGetDiagRec it reports error SQL0519N.           * 
*                                                              * 
* The problem happens if the "SELECT ... FOR UPDATE" statement * 
* associated with the cursor <cursor-name>                     * 
* has one isolation level and the "UPDATE .. WHERE CURRENT OF  * 
* <cursor-name>" statement has a different isolation level set * 
* by                                                           * 
* using the SQL_ATTR_STMTTXN_ISOLATION or                      * 
* SQL_ATTR_TXN_ISOLATION                                       * 
* statement handle attributes.                                 * 
**************************************************************** 
* RECOMMENDATION:                                              * 
* .                                                            * 
****************************************************************
Local Fix:
As a workaround, rather than setting the isolation level for 
individual statements set the isolation level for the 
connection instead. You can set the isolation level for the 
connection by setting the TXNISOLATION DB2 CLI/ODBC 
configuration keyword or by setting the SQL_ATTR_TXN_ISOLATION 
attribute for the connection handle.
available fix packs:
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
Problem was first fixed in Version 9.7 Fix Pack 5. 
At a minimum, this fix should be applied on the client.
Workaround
As a workaround, rather than setting the isolation level for 
individual statements set the isolation level for the connection 
instead. 
You can set the isolation level for the connection by setting 
the TXNISOLATION DB2 CLI/ODBC configuration keyword or by 
setting the SQL_ATTR_TXN_ISOLATION attribute for the connection 
handle.
BUG-Tracking
forerunner  : APAR is sysrouted TO one or more of the following: IC73576 IC73577 
follow-up : 
Timestamps
Date  - problem reported    :
Date  - problem closed      :
Date  - last modified       :
15.12.2010
23.12.2011
23.12.2011
Problem solved at the following versions (IBM BugInfos)
9.7.FP5
Problem solved according to the fixlist(s) of the following version(s)
9.7.0.5 FixList