DB2 - Problem description
Problem IC87869 | Status: Closed |
PREDICATES WITH LTRIM() FUNCTION CAN NOT BE PUSHED DOWN | |
product: | |
DB2 FOR LUW / DB2FORLUW / A10 - DB2 | |
Problem description: | |
Function mapping for SYSIBM.LTRIM is missing, which prevents predicates with this function from being pushdown. This could lead to performance problem, or SQL1822N error in delete/update. A delete/update statement against MSSQL nicknames may fail with an error as: DELETE FROM NICKNAME1 A WHERE NOT EXISTS ( SELECT 1 FROM NICKNAME2 B WHERE A.COLUMN1 = B.COLUMN1 AND LTRIM(A.COLUMN2) = B.COLUMN2 ) DB21034E The command was processed as an SQL statement because it was not a valid Command Line Processor command. During SQL processing it returned: SQL1822N Unexpected error code "24000" received from data source "MYSERVER". Associated text and tokens are " Invalid cursor state". SQLSTATE=560BD | |
Problem Summary: | |
**************************************************************** * USERS AFFECTED: * * The users running MSSQL wrapper attempting to execute a SQL * * statment having LTRIM() function. * **************************************************************** * PROBLEM DESCRIPTION: * * See Error Description * **************************************************************** * RECOMMENDATION: * * Upgrade to InfoSphere Federation Server v101fp2 or later. * **************************************************************** | |
Local Fix: | |
CREATE FUNCTION MAPPING my_mapping1 FOR SYSIBM.LTRIM(SYSIBM.CHAR()) SERVER <SERVER> OPTIONS (REMOTE_NAME 'LTRIM(:1P)') CREATE FUNCTION MAPPING my_mapping2 FOR SYSIBM.LTRIM(SYSIBM.VARCHAR()) SERVER <SERVER>OPTIONS (REMOTE_NAME 'LTRIM(:1P)') | |
available fix packs: | |
DB2 Version 10.1 Fix Pack 2 for Linux, UNIX, and Windows | |
Solution | |
The problem is first fixed at v101fp2. | |
Workaround | |
not known / see Local fix | |
Timestamps | |
Date - problem reported : Date - problem closed : Date - last modified : | 04.11.2012 18.12.2012 18.12.2012 |
Problem solved at the following versions (IBM BugInfos) | |
Problem solved according to the fixlist(s) of the following version(s) | |
10.1.0.2 | |
10.5.0.2 |