home clear 64x64
en blue 200x116 de orange 200x116 info letter User
suche 36x36
Neueste VersionenFixList
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
Haben Sie Probleme? - Kontaktieren Sie uns.
Kostenlos registrieren anmeldung-x26
Kontaktformular kontakt-x26

DB2 - Problembeschreibung

Problem IC80098 Status: Geschlossen

SQL0303N DURING EXECUTION OF SQL STORED PROCEDURE THAT INVOLVES THE
CONVERSION BETWEEN CHAR TYPES AND NCHAR/GRAPHIC TYPES

Produkt:
DB2 FOR LUW / DB2FORLUW / 970 - DB2
Problembeschreibung:
Execution of the SQL stored procedure fails with SQL0303N error 
if it involves conversion between CHAR types and NCHAR/GRAPHIC 
types for UTF-8 databases. 
 
SQL0303N  A value cannot be assigned to a host variable in the 
SELECT, VALUES, FETCH or assignment statement because the data 
types are  not compatible. 
 
Sample: 
 
Execution of the following stored procedure fails with SQL0303N 
error: 
 
create procedure prc1( IN action integer,INOUT p2 nvarchar(240)) 
BEGIN 
  declare wiac_var nvarchar(240); 
  DECLARE lec_amrapp CURSOR WITH HOLD 
  FOR 
  SELECT 'X' FROM sysibm.dual ; 
   OPEN lec_amrapp; 
   FETCH lec_amrapp INTO wiac_var; 
   CLOSE lec_amrapp; 
   set p2=wiac_var; 
   return 1; 
END 
@ 
 
C:\Program Files\IBM\ESEV975\BIN>db2 call prc1(1,'a') 
SQL0303N  A value cannot be assigned to a host variable in the 
SELECT, VALUES, 
FETCH or assignment statement because the data types are not 
compatible. 
SQLSTATE=42806 
 
 
Here is a summary of conversions that we will support for this 
APAR : 
 
CHAR/VARCHAR to and from GRAPHIC/VARGRAPHIC/NCHAR/NVARCHAR in 
Unicode 
Databases only  (1208->1200).
Problem-Zusammenfassung:
Users affected: All 
Problem details: Execution of the SQL stored procedure fails 
with SQL0303N error 
if it involves conversion between CHAR types and NCHAR/GRAPHIC 
types for UTF-8 databases.
Local-Fix:
Use the same  data type to avoid conversion. 
 
For above testcase use 
 
SELECT N'X' FROM sysibm.dual;
verfügbare FixPacks:
DB2 Version 9.7 Fix Pack 6 for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 7 for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 8 for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 9 for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 9a for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 10 for Linux, UNIX, and Windows

Lösung
First fixed in v9.7fp6
Workaround
Use the same  data type to avoid conversion.
Bug-Verfolgung
Vorgänger  : APAR is sysrouted TO one or more of the following: IC84185 
Nachfolger : 
Weitere Daten
Datum - Problem gemeldet    :
Datum - Problem geschlossen :
Datum - der letzten Änderung:
30.11.2011
13.06.2012
13.06.2012
Problem behoben ab folgender Versionen (IBM BugInfos)
9.7.FP6
Problem behoben lt. FixList in der Version
9.7.0.6 FixList