DB2 - Problem description
| Problem IC69411 | Status: Closed |
SQL0332 AND TRAP CALLING FEDERATED STORED PROCEDURE IF THE FEDER ATED SERVER AND REMOTE DATA SOURCE CODE PAGES ARE INCOMPATIBLE. | |
| product: | |
DB2 FOR LUW / DB2FORLUW / 950 - DB2 | |
| Problem 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 | |
| Problem Summary: | |
**************************************************************** * USERS AFFECTED: * * Users of a federated system with DB2 for Linux, UNIX and * * Windows * **************************************************************** * PROBLEM DESCRIPTION: * * See Error Description * **************************************************************** * RECOMMENDATION: * * . * **************************************************************** | |
| 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. | |
| available fix packs: | |
DB2 Version 9.5 Fix Pack 7 for Linux, UNIX, and Windows | |
| Solution | |
Problem was first fixed in Version 9.5 Fix Pack 7 | |
| Workaround | |
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. | |
| BUG-Tracking | |
forerunner : APAR is sysrouted TO one or more of the following: IC69470 IC69472 follow-up : | |
| Timestamps | |
Date - problem reported : Date - problem closed : Date - last modified : | 23.06.2010 27.01.2011 27.01.2011 |
| Problem solved at the following versions (IBM BugInfos) | |
9.5.FP7 | |
| Problem solved according to the fixlist(s) of the following version(s) | |
| 9.1.0.7 |
|
| 9.5.0.7 |
|