IBM Support

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

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

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

Local fix

  • Rewrite EXPORT's select statement such that the token directly
    following the first FROM keyword 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               *
    ****************************************************************
    

Problem conclusion

  • First fixed in Db2 11.1 Mod 3 Fix Pack 3
    

Temporary fix

Comments

APAR Information

  • APAR number

    IT16704

  • Reported component name

    DB2 FOR LUW

  • Reported component ID

    DB2FORLUW

  • Reported release

    B10

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2016-08-22

  • Closed date

    2018-03-19

  • Last modified date

    2018-03-19

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

    IT15820

  • 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

  • RB10 PSN

       UP

[{"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Product":{"code":"SSEPGG","label":"Db2 for Linux, UNIX and Windows"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"11.1","Edition":"","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Document Information

Modified date:
19 March 2018