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

RECEIVE SQL1822N/SQL0401N ERROR WHEN QUERYING A NICKNAME IN AN ORA MODE
DATABASE

product:
DB2 FOR LUW / DB2FORLUW / A50 - DB2
Problem description:
The problem happens when the federated database is a ORA 
compatibility database while the data source is not. 
The error happens because a remote statement like below is 
pushed down to data source even though COLUMN1's data type is 
DATE in the remote database: 
 
CAST(:H0 AS TIMESTAMP) <= B0."COLUMN1" 
 
The problem can be reproduced as: 
 
SET PASSTHRU OS400SERV; 
DROP TABLE TEST; 
CREATE TABLE TEST(C1 INT, C2 DATE); 
SET PASSTHRU RESET; 
 
 
CREATE NICKNAME NICK1 FOR OS400SERV."MYSCHEMA"."TEST"; 
 
CREATE PROCEDURE TEST1 (OUT pC1 INT) 
     SPECIFIC TEST1 
     LANGUAGE SQL 
   BEGIN 
     DECLARE VC2 VARCHAR(10)  DEFAULT '2013-07-05';-- 
     SELECT COUNT(C1) INTO pC1 FROM NICK1 where C2>=VC2;-- 
   END ; 
 
db2 => call test1(?) 
SQL1822N  Unexpected error code "-401" received from data source 
"OS400SERV". 
Associated text and tokens are " SQL0401N  The data types of the 
operands for 
the opera".  SQLSTATE=560BD
Problem Summary:
**************************************************************** 
* USERS AFFECTED:                                              * 
* The users are querying a nickname on Ora mode database.      * 
**************************************************************** 
* PROBLEM DESCRIPTION:                                         * 
* See Error Description                                        * 
**************************************************************** 
* RECOMMENDATION:                                              * 
* Update to 10.5.0.3                                           * 
****************************************************************
Local Fix:
Modify your application or procedure, declare the host variable 
with type of DATE instead of VARCAHR/CHAR: 
 
CREATE PROCEDURE TEST1 (OUT pC1 INT) 
     SPECIFIC TEST1 
     LANGUAGE SQL 
   BEGIN 
     DECLARE VC2 DATE  DEFAULT '2013-07-05';-- 
     SELECT COUNT(C1) INTO pC1 FROM NICK1 where C2>=VC2;-- 
   END
available fix packs:
DB2 Version 10.5 Fix Pack 3 for Linux, UNIX, and Windows
DB2 Version 10.5 Fix Pack 3a for Linux, UNIX, and Windows
DB2 Cancun Release 10.5.0.4 (also known as Fix Pack 4) for Linux, UNIX, and Windows
DB2 Version 10.5 Fix Pack 9 for Linux, UNIX, and Windows

Solution
Problem Fixed In 10.5.0.3
Workaround
not known / see Local fix
Timestamps
Date  - problem reported    :
Date  - problem closed      :
Date  - last modified       :
27.08.2013
03.03.2014
03.03.2014
Problem solved at the following versions (IBM BugInfos)
Problem solved according to the fixlist(s) of the following version(s)
10.5.0.3 FixList
10.5.0.3 FixList