IBM Support

IC69472: SQL0332 AND TRAP CALLING FEDERATED STORED PROCEDURE IF THE FEDER ATED SERVER AND REMOTE DATA SOURCE CODE PAGES ARE INCOMPATIBLE.

Subscribe

You can track all active APARs for this component.

APAR status

  • Closed as program error.

Error description

  • The DB2 instance traps when you call a federated stored
    procedure which returns a result set and for which the remote
    data source has a code page that is incompatible with the
    application code page of the federated server.
    
    Just before the trap, db2diag.log includes the message:
     [IBM][CLI Driver][AS] SQL0332N  Character conversion from the
    source code page "XXX" to the target code page "YYY" is not
    supported.
    where "XXX" stands for the code page of the remote data source
    and "YYY" stands for the application code page of the federated
    server.
    
    Here is an example of the sequence of messages that db2diag.log
    contains from just before the trap.
    In this example the code page of the remote data source is 937
    and the application code page of the federated server is 1252.
    
    2099-12-31-00.00.00.000000+000 XXXXXXXXXX        LEVEL: Error
    PID    : 9999                TID  : 9999        PROC :
    db2syscs.exe
    INSTANCE: MYINST              NODE : 000        DB  : MYDB
    APPHDL  : 9999                APPID: XXXXXXXXXXXXXXX
    AUTHID  : MYAUTHID
    EDUID  : 9999                EDUNAME: db2agent (MYDB) 0
    FUNCTION: DB2 UDB, call level interface, CLI_utlConvertCP,
    probe:800
    MESSAGE : The following error occurred during codepage
    conversion ( Dumping
              SQLCA ) :
    DATA #1 : SQLCA, PD_DB2_TYPE_SQLCA, 136 bytes
    sqlcaid : SQLCA    sqlcabc: 136  sqlcode: -332  sqlerrml: 9
    sqlerrmc: 937 1252
    sqlerrp : SQLCLICP
    sqlerrd : (1) 0x800F005B      (2) 0x0000005B      (3) 0x00000000
              (4) 0x00000000      (5) 0x00000000      (6) 0x00000000
    sqlwarn : (1)      (2)      (3)      (4)        (5)      (6)
              (7)      (8)      (9)      (10)        (11)
    sqlstate: 57017
    
    2099-12-31-00.00.00.000000+000 XXXXXXXXXX        LEVEL: Error
    PID    : 9999                TID  : 9999        PROC :
    db2syscs.exe
    INSTANCE: MYINST              NODE : 000        DB  : MYDB
    APPHDL  : 9999                APPID: XXXXXXXXXXXXXXX
    AUTHID  : MYAUTHID
    EDUID  : 9999                EDUNAME: db2agent (MYDB) 0
    FUNCTION: DB2 UDB, drda wrapper, report_error_message, probe:10
    DATA #1 : String, 16 bytes
    DRDA Server:
    DATA #2 : String with size, 8 bytes
    MYSERVER
    DATA #3 : String, 16 bytes
    Function name:
    DATA #4 : String with size, 24 bytes
    DRDA_Statement::describe
    
    2099-12-31-00.00.00.000000+000 XXXXXXXXXX        LEVEL: Error
    PID    : 9999                TID  : 9999        PROC :
    db2syscs.exe
    INSTANCE: MYINST              NODE : 000        DB  : MYDB
    APPHDL  : 9999                APPID: XXXXXXXXXXXXXXX
    AUTHID  : MYAUTHID
    EDUID  : 9999                EDUNAME: db2agent (MYDB) 0
    FUNCTION: DB2 UDB, drda wrapper, report_error_message, probe:20
    DATA #1 : String, 16 bytes
    ODBC native err:
    DATA #2 : String with size, 4 bytes
    -332
    DATA #3 : String, 16 bytes
    ODBC sqlstate:
    DATA #4 : String with size, 6 bytes
        .
    DATA #5 : String, 16 bytes
    ODBC error txt:
    DATA #6 : String with size, 135 bytes
    [IBM][CLI Driver][AS] SQL0332N  Character conversion from the
    source code page "937" to the target code page "1252" is not
    supported.
    
    
    At the top of the stack when this trap occurs are these
    functions:
    
    describe@DRDA_Statement
    describe@DRDA_ResultSet
    sqlqg_FMP_ExecuteProc
    sqlqgRouter
    sqlqg_fedstp_hook
    sqlqgDyload
    sqlriFedInvokerTrusted
    sqlriFedInvokeInvoker
    sqlqg_Call_FMP_Thread
    sqlqgExecuteProc
    sqlriDjxExecuteProc
    sqlriExecThread
    sqlriDjxProcRouter
    sqlriSectInvoke
    sqlrr_process_execute_request
    sqlrr_execute
    

Local fix

  • As a workaround, set the application code page on the federated
    server to a code page that is compatible with the code page of
    the remote data source.
    For example, to set the application code page on the federated
    server to 1208 (which is the UTF-8 encoding of Unicode), run
    db2set DB2CODEPAGE=1208
    on the federated server.
    

Problem summary

  • ****************************************************************
    * USERS AFFECTED:                                              *
    * Users of DB2 for Linux, UNIX and Windows federated systems   *
    ****************************************************************
    * PROBLEM DESCRIPTION:                                         *
    * See Error Description                                        *
    ****************************************************************
    * RECOMMENDATION:                                              *
    * .                                                            *
    ****************************************************************
    

Problem conclusion

  • Problem was first fixed in Version 9.7 Fix Pack 4
    

Temporary fix

  • As a workaround, set the application code page on the federated
    
    server to a code page that is compatible with the code page of
    the remote data source.
    For example, to set the application code page on the federated
    
    server to 1208 (which is the UTF-8 encoding of Unicode), run:
    
     db2set DB2CODEPAGE=1208
    on the federated server.
    

Comments

APAR Information

  • APAR number

    IC69472

  • 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

    2010-06-25

  • Closed date

    2011-05-24

  • Last modified date

    2011-05-24

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

    IC69411

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

Fix information

  • Fixed component name

    DB2 FOR LUW

  • Fixed component ID

    DB2FORLUW

Applicable component levels

  • R910 PSN

       UP

  • R950 PSN

       UP

  • R970 PSN

       UP



Document information

More support for: DB2 for Linux, UNIX and Windows

Software version: 9.7

Reference #: IC69472

Modified date: 24 May 2011