home clear 64x64
en blue 200x116 de orange 200x116 info letter User
suche 36x36
Neueste VersionenFixList
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
Haben Sie Probleme? - Kontaktieren Sie uns.
Kostenlos registrieren anmeldung-x26
Kontaktformular kontakt-x26

DB2 - Problembeschreibung

Problem IC68198 Status: Geschlossen

SQLFREEHANDLE() for environment handle in CLI application returns -1
on DB2 V9.7 FP1

Produkt:
DB2 FOR LUW / DB2FORLUW / 970 - DB2
Problembeschreibung:
SQLFreeHandle() for environment handle in CLI application 
returns 0 on DB2 V9.7 GA. 
However, it returns -1 on DB2 V9.7 FP1. 
 
We can reproduce this issue. 
Here is a part of the application code and its result. 
 
$ cat cli01.c 
...(snip)... 
int main(int argc, char *argv[]) 
{ 
...(snip)... 
  printf("\n  Disconnecting from %s...\n", dbAlias); 
  cliRC = SQLDisconnect(hdbc); 
  DBC_HANDLE_CHECK(hdbc, cliRC); 
. 
  printf("  Disconnected from %s.\n", dbAlias); 
. 
  /* free connection handle */ 
  cliRC = SQLFreeHandle(SQL_HANDLE_DBC, hdbc); 
  DBC_HANDLE_CHECK(hdbc, cliRC); 
. 
  /* free environment handle */ 
  cliRC = SQLFreeHandle(SQL_HANDLE_ENV, henv); 
  printf("cliRC = [%d]\n", cliRC); 
  ENV_HANDLE_CHECK(henv, cliRC); 
. 
  return rc; 
} /* main */ 
 
 
 
This problem occurs only when we build it as 32-bit application 
on 
V9.7 FP1. like the following(badcase): 
 
  xlc -I/home/v97fp1/sqllib/include -c cli01.c 
 
  xlc -o cli01 cli01.o -L/home/v97fp1/sqllib/lib32 -ldb2 
 
 
 
On the other hand, this problem does not occur if we compile it 
as 64-bit. 
 
Application issues SQLFreeHandle twice. The first one for 
SQL_HANDLE_DBC succeeds with rc 0, but the second one for 
SQL_HANDLE_ENV gets RC -1 even though cli trace shows 
SQL_SUCCESS.
Problem-Zusammenfassung:
**************************************************************** 
* USERS AFFECTED:                                              * 
* V97 FP1 or FP2 user                                          * 
**************************************************************** 
* PROBLEM DESCRIPTION:                                         * 
* SQLFreeHandle() for environment handle in CLI application    * 
*                                                              * 
* returns 0 on DB2 V9.7 GA.                                    * 
*                                                              * 
* However, it returns -1 on DB2 V9.7 FP1.                      * 
* Problem occurs only when we build it as 32-bit application   * 
* on                                                           * 
* V9.7 FP1.                                                    * 
* On the other hand, this problem does not occur if we compile * 
* it as 64-bit.                                                * 
**************************************************************** 
* RECOMMENDATION:                                              * 
* Upgrade to DB2 Version 9.7 Fix Pack 3.                       * 
****************************************************************
Local-Fix:
verfügbare FixPacks:
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

Lösung
Problem was first fixed in V9.7 FP3.
Workaround
keiner bekannt / siehe Local-Fix
Bug-Verfolgung
Vorgänger  : APAR is sysrouted TO one or more of the following: IC68787 
Nachfolger : 
Weitere Daten
Datum - Problem gemeldet    :
Datum - Problem geschlossen :
Datum - der letzten Änderung:
26.04.2010
03.10.2010
03.10.2010
Problem behoben ab folgender Versionen (IBM BugInfos)
9.7.FP3
Problem behoben lt. FixList in der Version
9.7.0.3 FixList
9.7.0.3 FixList