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

WITH VARCHAR2-SUPPORTED DATABASE YOU MIGHT GET AN ERROR -305 WHILE
PERFORMING AN EXPORT

product:
DB2 FOR LUW / DB2FORLUW / B10 - DB2
Problem description:
A DB2 database supports the VARCHAR2 data type, if the 
DB2_COMPATIBILITY_VECTOR registry variable is set to hexadecimal 
value 20 (or any value that includes 20 (bit position 6) such as 
FBF or ORA) at the time of database creation.  Such databases 
have the varchar2_compat database configuration parameter set to 
ON. 
 
With such VARCHAR2-supported databases, you might get an error 
-305 while performing an EXPORT, if EXPORT's select-statement 
does not have the tablename directly following the FROM keyword. 
For example, 
 
$ db2 "export to file.del of del select q1.* from ( select col1 
from test ) as q1 " 
 
SQL3104N  The Export utility is beginning to export data to file 
"file.del". 
SQL3015N  An SQL error "-305" occurred during processing. 
SQL0305N  The NULL value cannot be assigned to a host variable 
because no indicator variable is specified.  SQLSTATE=22002 
 
 
db2diag.log reports the message : 
 
2015-12-02-10.36.52.148016+060 I3081A578            LEVEL: Error 
PID     : 63504436             TID : 1              PROC : db2bp 
INSTANCE: db2inst2             NODE : 000           DB   : 
STATSUNO 
APPID   : *LOCAL.db2inst2.160506205246 
HOSTNAME: hostname 
EDUID   : 1 
FUNCTION: DB2 UDB, database utilities, sqluCheckSqlca, 
probe:1882 
MESSAGE : SQL0305N  The NULL value cannot be assigned to a host 
variable 
          because no indicator variable is specified. 
DATA #1 : String, 12 bytes 
sqluigsi.SQC 
DATA #2 : String, 44 bytes 
Error from Import/Export or Load Processing. 
 
 
In the above example, the token directly following the first 
FROM keyword is ( which is not a tablename. 
 
As a counter-example, there is no -305 error with 
   db2 "export to file.del of del select q1.* from test as q1" 
as the token directly following the first FROM keyword is test 
which is the tablename.
Problem Summary:
**************************************************************** 
* USERS AFFECTED:                                              * 
* ALL                                                          * 
**************************************************************** 
* PROBLEM DESCRIPTION:                                         * 
* See Error Description                                        * 
**************************************************************** 
* RECOMMENDATION:                                              * 
* Upgrade to Db2 11.1 Mod 3 Fix Pack 3 or higher               * 
****************************************************************
Local Fix:
Rewrite EXPORT's select statement such that the token directly 
following the first FROM keyword is the tablename.
available fix packs:
Db2 Version 11.1 Mod 3 Fix Pack 3 for Linux, UNIX, and Windows
Db2 Version 11.1 Mod3 Fix Pack3 iFix001 for Linux, UNIX, and Windows
Db2 Version 11.1 Mod3 Fix Pack3 iFix002 for Linux, UNIX, and Windows

Solution
First fixed in Db2 11.1 Mod 3 Fix Pack 3
Workaround
not known / see Local fix
Timestamps
Date  - problem reported    :
Date  - problem closed      :
Date  - last modified       :
22.08.2016
19.03.2018
19.03.2018
Problem solved at the following versions (IBM BugInfos)
Problem solved according to the fixlist(s) of the following version(s)