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 IC76932 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 / 950 - 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 
callfunction 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.5 Fix Pack 9 for Linux, UNIX, and Windows
DB2 Version 9.5 Fix Pack 10 for Linux, UNIX, and Windows

Lösung
Problem was first fixed in Version 9.5 Fix Pack 9. 
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.
Weitere Daten
Datum - Problem gemeldet    :
Datum - Problem geschlossen :
Datum - der letzten Änderung:
13.06.2011
13.03.2012
13.03.2012
Problem behoben ab folgender Versionen (IBM BugInfos)
9.5.FP9
Problem behoben lt. FixList in der Version
9.5.0.9 FixList