IBM Support

IT29206: SQLSETCONNECTATTRW() WITH SQL_ATTR_SESSION_GLOBAL_VAR ATTRIBUTEIS NOT WORKING AS EXPECTED

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • When application has SQLSetConnectAttrW() API call with
    SQL_ATTR_SESSION_GLOBAL_VAR  attribute, it is working as
    designed.  Client is not sending the attribute list to server
    and resulting in unexpected error.
    
      memcpy(membuf, "SQL_COMPAT='NPS'", 17);
      membuf[17] = '\0';
    
      toWideChar(membuf, szAttribBuf);
      sql_rc = SQLSetConnectAttrW(hdbc, SQL_ATTR_SESSION_GLOBAL_VAR,
    szAttribBuf, SQL_NTS);
    
    When application calls like this, client is not sending the
    SQL_COMPAT='NPS' to server.
    
    In DRDA trace we see empty set statement flowing to server:
    DDM Format: d0 SEND(AR) OBJDSS - Object Data Stream Structure
    LL: 23 CORR: 0003 CHAINED: y CONT ON ERR: n SAME CORR FOR NEXT
    DSS: n
    
    NM: SQLSTT - SQL Statement
    LL: 17 CP: 2414
    DATA: (ASCII) (EBCDIC)
    0000000007534554 20203D20FF .....SET = . .............
    
    DDM Format: d0 SEND(AR) RQSDSS - Request Data Stream Structure
    LL: 78 CORR: 0004 CHAINED: y CONT ON ERR: n SAME CORR FOR NEXT
    DSS: y
    

Local fix

Problem summary

  • ****************************************************************
    * USERS AFFECTED:                                              *
    * DB2 CLI/ODBC Unicode API users                               *
    ****************************************************************
    * PROBLEM DESCRIPTION:                                         *
    * See Error Description                                        *
    ****************************************************************
    * RECOMMENDATION:                                              *
    * Upgrade to DB2 version 11.1.4.5                              *
    ****************************************************************
    

Problem conclusion

  • With DB2 v11.1.4.5 we will see SQLSetConnectAttrW() with
    SQL_ATTR_SESSION_GLOBAL_VAR  working correctly.
    

Temporary fix

Comments

APAR Information

  • APAR number

    IT29206

  • Reported component name

    DB2 CONNECT

  • Reported component ID

    DB2CONNCT

  • Reported release

    B10

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2019-05-21

  • Closed date

    2020-02-23

  • Last modified date

    2020-02-23

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

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

Fix information

  • Fixed component name

    DB2 CONNECT

  • Fixed component ID

    DB2CONNCT

Applicable component levels

  • RB10 PSY

       UP

[{"Business Unit":{"code":"BU054","label":"Systems w\/TPS"},"Product":{"code":"SG19M"},"Platform":[{"code":"PF054","label":"z\/OS"}],"Version":"11.1"}]

Document Information

Modified date:
03 September 2021