IBM Support

IT21245: DB2BULKCOPY CAUSES THE ERROR CLI0112E AND LOAD INCORRECT VALUES WHEN USING SQLDATAREADER

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • For the case SQLDataReader -> DB2BulkCopy, the following is the
    used
    code, resulting in CLI0112E at copy.WriteToServer(reader):
    
    Imports System
    Imports System.IO
    Imports System.Data
    Imports IBM.Data.DB2
    Imports Microsoft.VisualBasic
    Imports System.Data.SqlClient
    
    Public Class Module1
        Public Shared Sub Main(args() As String)
            Try
                Using sqlconn As SqlConnection = New
    SqlConnection("Server=MM-PC\SQLEXPRESS;Database=testjg;UserId=je
    nsi;Password=mypwd;")
                    sqlconn.Open()
                    Using cmd As SqlCommand =
    sqlconn.CreateCommand()
                        cmd.CommandText = "Select F1, F2, F3 From
    dbo.t1"
                        Using reader As SqlDataReader =
    cmd.ExecuteReader()
                            Using cn As New
    DB2Connection("Database=SAMPLE;UID=db2admin;Pwd=mypwd;Server=127
    .0.0.1:50000")
                                cn.Open()
                                Using copy As New DB2BulkCopy(cn)
                                    copy.BulkCopyTimeout = 0
                                    copy.DestinationTableName
    ="db2admin.t2"
                                    copy.ColumnMappings.Add(New
    DB2BulkCopyColumnMapping("F1", "F1"))
                                    copy.ColumnMappings.Add(New
    DB2BulkCopyColumnMapping("F2", "F2"))
                                    copy.ColumnMappings.Add(New
    DB2BulkCopyColumnMapping("F3", "F3"))
                                    copy.WriteToServer(reader)
                                    copy.Close()
                                    Console.WriteLine("success")
                                End Using
                            End Using
                        End Using
                    End Using
                End Using
            Catch ex As Exception
                Dim fehler As String = ex.ToString()
                Console.WriteLine(fehler)
            End Try
        End Sub
    End Class
    

Local fix

Problem summary

  • ****************************************************************
    * USERS AFFECTED:                                              *
    * All                                                          *
    ****************************************************************
    * PROBLEM DESCRIPTION:                                         *
    * See Error Description                                        *
    ****************************************************************
    * RECOMMENDATION:                                              *
    * Upgrade to V11.1.3.3.                                        *
    ****************************************************************
    

Problem conclusion

  • Fixed in V11.1.3.3.
    

Temporary fix

Comments

APAR Information

  • APAR number

    IT21245

  • 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

    2017-06-29

  • Closed date

    2022-06-10

  • Last modified date

    2022-06-10

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

    IT21243

  • 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

[{"Line of Business":{"code":"LOB10","label":"Data and AI"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SSEPGG","label":"DB2 for Linux- UNIX and Windows"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"11.1"}]

Document Information

Modified date:
11 June 2022