IBM Support

IT35236: DATE PRECISION IS LOST WHEN REMOTE SQL SHIPPED TO FEDERATED DB AND RESULTS IN 0 ROWS.

Subscribe to this APAR

By subscribing, you receive periodic emails alerting you to the status of the APAR, along with a link to the fix after it becomes available. You can track this item individually or track all items by product.

Notify me when this APAR changes.

Notify me when an APAR for this component changes.

 

APAR status

  • Closed as program error.

Error description

  • It is the same issue as v11.5 APAR IT34960.
    
    federated DB:
    Oracle
    db2set:
    DB2_COMPATIBILITY_VECTOR=ORA
    
    problem:
    When the below types of where predicate is sent by DB2 to
    federated Oracle DB , there is no results returned by db2.
    in the below example the 'remote statement' prepared & sent by
    DB2 to Oracle is:
    Example:
    select * from tab1 t where TRUNC(CURRENT_DATE) - t.run_time >
    2/(24*60)
    
    In the explain we see that Remote statement:
    RMTQTXT : (Remote statement):
    Where (0.001388888888888888888888888888888889 < EXTRACT(DAY FROM
    (TRUNC(TO_TIMESTAMP(:H1 )) - A0."RUN_TIME")))
    
    the root cause for the wrong result (no date return) of bad
    query is we tried to convert DATE INTERVAL type result of
    TRUNC(CURRENT_DATE) - t.RUN_TIME to the number of days using "
    EXTRACT(DAY FROM...)" in Oracle, but  EXTRACT could only get the
    DAY part of the date interval, not the number of days for the
    whole interval in Oracle. For example DATA INTERVAL +000000000
    19:58:59.000, EXTRACT(DAY FROM +000000000 19:58:59.000) will get
    0, not 0.832627315.
    This cause the wrong result and thus 0 rows returned.
    

Local fix

Problem summary

  • ****************************************************************
    * USERS AFFECTED:                                              *
    * 11.1                                                         *
    ****************************************************************
    * PROBLEM DESCRIPTION:                                         *
    * See Error Description                                        *
    ****************************************************************
    * RECOMMENDATION:                                              *
    * Upgrade to V11.1.4.6                                         *
    ****************************************************************
    

Problem conclusion

  • DATE PRECISION IS LOST WHEN REMOTE SQL SHIPPED TO FEDERATED DB
    AND RESULTS IN 0 ROWS.
    

Temporary fix

Comments

APAR Information

  • APAR number

    IT35236

  • 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

    2020-12-10

  • Closed date

    2021-06-15

  • Last modified date

    2021-06-15

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

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

    IT37259

Fix information

  • Fixed component name

    DB2 FOR LUW

  • Fixed component ID

    DB2FORLUW

Applicable component levels

[{"Line of Business":{"code":"LOB10","label":"Data and AI"},"Business Unit":{"code":"BU029","label":"Software"},"Product":{"code":"SSEPGG","label":"DB2 for Linux- UNIX and Windows"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"11.1"}]

Document Information

Modified date:
16 June 2021