IBM Support

IC78251: ADMIN_MOVE_TABLE PROCEDURE RETURNS SQL0969N, SQL1188N or SQL0408N ERROR CODE.

Subscribe

You can track all active APARs for this component.

APAR status

  • Closed as program error.

Error description

  • If a table has a column named CURRENT_TIME which is of type
    TIME, then  ADMIN_MOVE_TABLE  procedure passes without any error
    but the value of  "CURRENT TIME" special register is inserted
    into the target table instead of the correct value from the
    source table. This problem results in data loss and incorrect
    results  being stored in the target table.
    
    The ADMIN_MOVE_TABLE procedure returns SQL0408N, SQL0969N or
    SQL1188N error message when the source table has a column named
    CURRENT_TIME but its type is not defined as TIME.
    
    For example:
    $ db2 "create table tab_with_time (current_time int not null)"
    DB20000I  The SQL command completed successfully.
    $ db2 "call admin_move_table ('WEIREN', 'TAB_WITH_TIME',
    'IBMDB2SAMPLEREL', 'IBMDB2SAMPLEREL', 'IBMDB2SAMPLEREL',  '','',
    '', '', '', 'MOVE')"
    SQL0408N  A value is not compatible with the data type of its
    assignment  target. Target name is "CURRENT_TIME".
    SQLSTATE=42821
    
    ADMIN_MOVE_TABLE procedure may also return SQL0969N or SQL1188N
    error messages instead:
    
    
    SQL0969N  There is no message text corresponding to SQL error
    "-99999"  in the  message file on this workstation.  The error
    was returned from module "SQL09073" with original tokens "".
    
    
    
    SQL1188N  Column "9" of the SELECT or VALUES statement is not
    compatible  with table column "9". The source column has sqltype
    "388", and the target column has sqltype "384".
    
    
    
    In the above example of SQL1188N message, SQL data type
    (SQLTYPE) 388 is TIME and SQLTYPE 384 is DATE. This shows that
    the original type of  CURRENT_TIME column is defined as DATE.
    More information on the SQL data types mentioned in SQL error
    messages can be found in the DB2 for Linux, UNIX, and Windows
    Information Center.
    

Local fix

  • Switch the table to offline mode and temporarily rename the
    column CURRENT_TIME to a different name. Then call the
    ADMIN_MOVE_TABLE procedure, and finally  change the column name
    back to CURRENT_TIME.
    

Problem summary

  • ****************************************************************
    * USERS AFFECTED:                                              *
    * Users of ADMIN_MOVE_TABLE                                    *
    ****************************************************************
    * PROBLEM DESCRIPTION:                                         *
    * See Error Description.                                       *
    ****************************************************************
    * RECOMMENDATION:                                              *
    * Upgrade to DB2 V9.7 Fix pack 5                               *
    ****************************************************************
    

Problem conclusion

  • Problem was first fixed in DB2 V9.7 Fix Pack 5
    

Temporary fix

  • See LOCAL FIX
    

Comments

APAR Information

  • APAR number

    IC78251

  • Reported component name

    DB2 FOR LUW

  • Reported component ID

    DB2FORLUW

  • Reported release

    970

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    YesHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2011-08-22

  • Closed date

    2011-11-01

  • Last modified date

    2011-11-01

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

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

    IC78387 IC83437

Fix information

  • Fixed component name

    DB2 FOR LUW

  • Fixed component ID

    DB2FORLUW

Applicable component levels

  • R970 PSN UP

       IC78251



Document information

More support for: DB2 for Linux, UNIX and Windows

Software version: 9.7

Reference #: IC78251

Modified date: 01 November 2011