IBM Support

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

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error 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.
    

Local fix

  • Define the local column with length no larger than 2000.
    

Problem summary

  • ****************************************************************
    * USERS AFFECTED:                                              *
    * Update nickname failed with  SQL1822N with "HY104 Invalid    *
    * precision value"                                             *
    ****************************************************************
    * PROBLEM DESCRIPTION:                                         *
    * See Error Description                                        *
    ****************************************************************
    * RECOMMENDATION:                                              *
    * Upgrade to DB2 v9.7 fix pace 9.                              *
    ****************************************************************
    

Problem conclusion

  • This problem is fixed in DB2 v9.7 fix pace 9.
    

Temporary fix

Comments

APAR Information

  • APAR number

    IC94950

  • Reported component name

    DB2 FOR LUW

  • Reported component ID

    DB2FORLUW

  • Reported release

    970

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2013-08-16

  • Closed date

    2013-12-16

  • Last modified date

    2013-12-16

  • APAR is sysrouted FROM one or more of the following:

  • APAR is sysrouted TO one or more of the following:

    IC95524 IC95657

Fix information

  • Fixed component name

    DB2 FOR LUW

  • Fixed component ID

    DB2FORLUW

Applicable component levels

  • R970 PSN

       UP

  • R970 PSY

       UP

[{"Business Unit":{"code":"BU048","label":"IBM Software"},"Product":{"code":"SSEPGG","label":"DB2 for Linux, UNIX and Windows"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"9.7","Edition":"","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Document Information

Modified date:
16 December 2013