IBM Support

IC84944: SQL0332N error received on SQLGetCursorName when executing CLI application using a DB2 Client from version 9.7.0.6 or 9.7.0.5

Subscribe

You can track all active APARs for this component.

APAR status

  • Closed as fixed if next.

Error description

  • Two scenarios may generate this symptom:
    
    When connection string passed to SQLDirverConnect() contains an
    invalid attribute that results only in a warning message
    CLI004W.  The connection to the database would be successful
    with warning(SUCCESS_WITH_INFO), but several of the DB2 CLI APIs
    may throw the -332 or CLI0118E error  further down the
    application logic.
    The problem has been seen with SQLGetCursorName()
    
    When attempting to access a DRDA nickname in a Federation Server
    environment with trusted context connection enabled.
    Though most of statements that access the nickname would be
    successful, several of them may fail with the -332 error.
    For example:
    -DELETE FROM <nickname> WHERE (SELECT * FROM <nickname> FETCH
    FIRST N ROWS ONLY)
    -UPDATE <nickname> SET set_clause (NOTE: problem happens if
    set_clause cannot be pushed down to remote)
    -DELETE FROM <nickname> WHERE CURRENT OF <CURSOR NAME>
    -UPDATE <nickname> SET set_clause WHERE CURRENT OF <CURSOR NAME>
    
    When Wrong parameter are passed to SQLDriverConnect it does not
    assign correct value to source codepage which results in
    conversion error
    
    From CLI traces
    
    SQLGetCursorNameW( hStmt=1:1, pszCursor=&00aef244,
    cbCursorMax=2374,pcbCursor=&00aefb94 )
    
        ---> Time elapsed - +8,320000E-004 seconds
    
    SQLGetCursorNameW( )
    
        <--- SQL_ERROR   Time elapsed - +1,108400E-002 seconds
    
    SQLFetch( hStmt=1:1 )
    
        ---> Time elapsed - +1,551000E-003 seconds
    
    ( Unretrieved error message="[IBM][CLI Driver][DB2/NT] SQL0332N
    Character conversion from the source code page "0" to the target
    code page "1202" is not supported." )
    
    SQLFetch( )
    
        <--- SQL_NO_DATA_FOUND   Time elapsed - +2,558000E-003
    seconds
    
    Another known scenario is the error in SQLPrepareW.
    The error happened for the select statement having a MBCS object
    name.
    
    The example of CLI trace.
    
    SQLGetDiagRec( pszSqlState="01S00", pfNativeError=-99999,
    pszErrorMsg="[IBM][CLI Driver] CLI0004W  Invalid connection
    string attribute. SQLSTATE=01S00", pcbErrorMsg=79 )
         <--- SQL_SUCCESS   Time elapsed - +7.030000E-004 seconds
    
     SQLAllocStmt( hDbc=0:1, phStmt=&0fffffffffffd3b0 )
         ---> Time elapsed - +3.080000E-004 seconds
    
     SQLAllocStmt( phStmt=1:1 )
        <--- SQL_SUCCESS   Time elapsed - +1.870000E-004 seconds
    
     SQLPrepareW( hStmt=1:1, pszSqlStr="SELECT <MBCS column name>
    from T1", cbSqlStr=-3 )
         ---> Time elapsed - +4.500000E-004 seconds
     ( StmtOut="" )"" )
    
     SQLPrepareW( )
         <--- SQL_ERROR   Time elapsed - +3.090000E-004 seconds
    
     SQLGetDiagField( fHandleType=SQL_HANDLE_STMT, hHandle=1:1,
    iRecNumber=0, fDiag
    Identifier=SQL_DIAG_NUMBER, pDiagInfo=&0fffffffffffcc74,
    cbDiagInfoMax=4, pcbDiagInfo=<NULL pointer> )
         ---> Time elapsed - +5.900000E-005 seconds
    
     SQLGetDiagField( pDiagInfo=1 )
         <--- SQL_SUCCESS   Time elapsed - +2.760000E-004 seconds
    
     SQLGetDiagField( fHandleType=SQL_HANDLE_STMT, hHandle=1:1,
    iRecNumber=6, fDiag
    Identifier=SQL_DIAG_INTERNAL_DIAGNOSTICS,
    pDiagInfo=&0fffffffffffcc70, cbDiagInfoMax=0, pcbDiagInfo=<NULL
    pointer> )
         ---> Time elapsed - +3.900000E-005 seconds
    
     SQLGetDiagField( pDiagInfo=-1 )
         <--- SQL_SUCCESS   Time elapsed - +2.780000E-004 seconds
    
     SQLGetDiagRec( fHandleType=SQL_HANDLE_STMT, hHandle=1:1,
    iRecNumber=1, pszSqlS
    tate=&0fffffffffffcc64, pfNativeError=&0fffffffffffcc6c,
    pszErrorMsg=&0fffffffffffcd00, cbErrorMsgMax=1024,
    pcbErrorMsg=&0fffffffffffcc60 )
    
    ********
    

Local fix

Problem summary

  • ****************************************************************
    * USERS AFFECTED:                                              *
    * All user prior to v9.7 fp7                                   *
    ****************************************************************
    * PROBLEM DESCRIPTION:                                         *
    * See Error Description                                        *
    ****************************************************************
    * RECOMMENDATION:                                              *
    * Upgrade to v9.7 fix pack 7                                   *
    ****************************************************************
    

Problem conclusion

Temporary fix

Comments

APAR Information

  • APAR number

    IC84944

  • Reported component name

    DB2 FOR LUW

  • Reported component ID

    DB2FORLUW

  • Reported release

    970

  • Status

    CLOSED FIN

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2012-06-27

  • Closed date

    2012-10-31

  • Last modified date

    2012-10-31

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

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

    IC85232

Fix information

Applicable component levels

  • R970 PSY

       UP



Document information

More support for: DB2 for Linux, UNIX and Windows

Software version: 9.7

Reference #: IC84944

Modified date: 31 October 2012