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 IC76847 Status: Geschlossen

TRAP IN FUNCTIONS SQLExecDirect, SQLPrepare AND SQLNativeSql FOR SOME SQL
STATEMENTS THAT CONTAIN AN ODBC VENDOR ESCAPE CLAUSE

Produkt:
DB2 FOR LUW / DB2FORLUW / 910 - DB2
Problembeschreibung:
When an application calls the CLI (Call Level Interface) API 
functions SQLExecDirect, SQLPrepare or SQLNativeSql, it will 
trap if both of the following conditions are true: 
 
1) The SQL statement which you pass to CLI API function contains 
an ODBC (Open Database Connectivity) vendor escape clause; and: 
2) The function call in the ODBC vendor escape clause contains 
doubly nested calls to ODBC extended scalar functions that are 
not in an ODBC vendor escape clause. 
 
An ODBC vendor escape clause is a call to an ODBC extended 
scalar functions that is contained within 
curly brackets ("{ fn ...}"). 
 
For example, with a database called APARTEST, if you run the 
following script, the db2cli command traps. 
That is because the SQL statement that is an argument of 
SQLNativeSql contains an ODBC vendor escape clause (to call 
function ABS) which contains doubly nested calls to function ABS 
that are not in an ODBC vendor escape clause. 
 
~/sqllib/samples/cli/db2cli <<! 
QuickConnect 10 20 apartest 
SQLNativeSql 20 "select {fn abs(abs(abs(6)))} from 
sysibm.sysdummy1" -3 500 
SQLError 0 20 SQL_NUL_HSTMT 
! 
 
But if you run the following script, the db2cli command does not 
trap, because all of the function calls, 
including the function calls that are nested within the 
outermost function call, are in an ODBC vendor escape clause. 
 
~/sqllib/samples/cli/db2cli <<! 
QuickConnect 10 20 apartest 
SQLNativeSql 20 "select {fn abs({fn abs({fn abs(6)})})} from 
sysibm.sysdummy1" -3 500 
SQLError 0 20 SQL_NUL_HSTMT 
! 
 
 
And if you run the following script, the db2cli command does not 
trap, because there is no ODBC vendor escape clause at all. 
 
~/sqllib/samples/cli/db2cli <<! 
QuickConnect 10 20 apartest 
SQLNativeSql 20 "select abs(abs(abs(6))) from sysibm.sysdummy1" 
-3 500 
SQLError 0 20 SQL_NUL_HSTMT 
!
Problem-Zusammenfassung:
**************************************************************** 
* USERS AFFECTED:                                              * 
* Users of DB2 for Linux, UNIX and Windows who run             * 
* applications that use CLI (Call Level Interface)             * 
**************************************************************** 
* PROBLEM DESCRIPTION:                                         * 
* See Error Description                                        * 
**************************************************************** 
* RECOMMENDATION:                                              * 
* .                                                            * 
****************************************************************
Local-Fix:
As a workaround, you can either: 
1) remove the ODBC vendor escape clause, or: 
2) ensure that all the nested calls to extended scalar functions 
are in an ODBC vendor escape clause.
verfügbare FixPacks:
DB2 Version 9.1 Fix Pack 11  for Linux, UNIX and Windows
DB2 Version 9.1 Fix Pack 12  for Linux, UNIX and Windows

Lösung
Problem was first fixed in Version 9.1 Fix Pack 11. 
At a minimum, this fix should be applied on the client.
Workaround
As a workaround, you can either: 
1) remove the ODBC vendor escape clause, or: 
2) ensure that all the nested calls to extended scalar functions 
are in an ODBC vendor escape clause.
Bug-Verfolgung
Vorgänger  : APAR is sysrouted TO one or more of the following: IC76932 IC76936 
Nachfolger : 
Weitere Daten
Datum - Problem gemeldet    :
Datum - Problem geschlossen :
Datum - der letzten Änderung:
08.06.2011
20.01.2012
20.01.2012
Problem behoben ab folgender Versionen (IBM BugInfos)
9.1.FP11
Problem behoben lt. FixList in der Version
9.1.0.11 FixList