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

FED: UPDATE NICKNAME FAILED WITH SQL1822N WITH "HY104 INVALID
PRECISION VALUE"

product:
DB2 FOR LUW / DB2FORLUW / A50 - DB2
Problem description:
Remote column on MSSQL Server is nvarchar or nchar and the local 
column type used to update the corresponding nickname is 
vargraphic, when the local column length is over than 2000, 
update nickname failed with  SQL1822N with server error "HY104 
Invalid precision value". 
 
UPDATE NICK1 SET ( C1 ) = ( select C1 from LTAB) 
 
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 "HY104" received from data 
source "MSSQL2008_SERV". Associated text and tokens are "Invalid 
precision value". SQLSTATE=560BD 
 
To reproduce the problem: 
 
set passthru mssql2008_serv; 
CREATE TABLE RTAB(C1 nvarchar(4000) COLLATE 
SQL_Latin1_General_CP1_CI_AS NULL); 
set passthru reset; 
 
CREATE NICKNAME NICK1 FOR <server_name>.<user_name>.RTAB; 
create LTAB (C1 vargraphic(2001)); 
insert into LTAB values ('the values is over 2000 characters '); 
 
UPDATE NICK1 SET ( C1 ) = ( select C1 from LTAB) 
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 "HY104" received from data 
source "MSSQL2008_SERV". Associated text and tokens are "Invalid 
precision value". SQLSTATE=560BD 
 
The error happens because the local column precision is 
calculated as the physical buffer length. If the column is a 
double byte type with length 2001, the precision will be 4002 
which over the threshold of max permit value.
Problem Summary:
**************************************************************** 
* USERS AFFECTED:                                              * 
* UPDATE NICKNAME FAILED WITH  SQL1822N WITH "HY104 INVALID    * 
* PRECISION VALUE"                                             * 
**************************************************************** 
* PROBLEM DESCRIPTION:                                         * 
* See Error Description                                        * 
**************************************************************** 
* RECOMMENDATION:                                              * 
* Please upgrade to DB2 v10.5 fixpack 3.                       * 
****************************************************************
Local Fix:
Define the local column with length no larger than 2000.
available fix packs:
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
This problem is fixed in DB2 v10.5 fixpack 3.
Workaround
not known / see Local fix
Timestamps
Date  - problem reported    :
Date  - problem closed      :
Date  - last modified       :
27.08.2013
15.09.2014
15.09.2014
Problem solved at the following versions (IBM BugInfos)
Problem solved according to the fixlist(s) of the following version(s)
10.5.0.4 FixList