SQLSTATE: 56038, SQLCODE: -4700

0

I am trying to connect to DB2 version 10.5 compatibility mode using ssis. I am successful in establishing the connection to DB2 and read from the table using Microsoft ole db provider for DB2. But the trouble that I am having is inserting into DB2 table. This ssis package worked fine with previous db2 version 9 but after upgrade its acting wired. I tried the IBM drivers 10.5 version but even that did not help. I am reading from flat file, manipulating rows using script component and data conversion to the right data types for db2 and inserting. I am having error at Inserting only. I created the same table with same data types in sql and insert works its only in DB2 it blows up. The error is very generic and even the errorcode and errorcolumn aren't giving any much info.

For Micrsoft drivers I am getting this error: Error: 0xC0202009 at Write to DB2 Tran table 1, OLE DB Destination [165]: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80040E21. An OLE DB record is available. Source: "Microsoft DB2 OLE DB Provider" Hresult: 0x80040E14 Description: "A SQL error has occurred. Please consult the documentation for your specific DB2 version for a description of the associated Native Error and SQL State. SQLSTATE: 56038, SQLCODE: -4700".

For IBM Drivers I am getting this error. Error: 0xC0202009 at Write to DB2 Tran table 1, OLE DB Destination [165]: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80004005. An OLE DB record is available. Source: "IBM OLE DB Provider for DB2" Hresult: 0x80004005 Description: " CLI0115E Invalid cursor state. SQLSTATE=24000". An OLE DB record is available. Source: "IBM OLE DB Provider for DB2" Hresult: 0x80004005 Description: " CLI0115E Invalid cursor state. SQLSTATE=24000".

Update: I was eventually able to track down the cause. The DB2 version that we are using is in Conversion Mode and for some reason(my db2 guys are still tracking this why) is not allowing inserts. Once they upgraded from Conversion Mode to New Function Mode my ssis package works like a charm. The second solution is to use OLE DB Provider for DB2 version 3.0 for conversion mode and it works if you are not upgrading DB2 databse to New Function Mode.

ssis
visual-studio-2013
db2
oledbconnection
asked on Stack Overflow Aug 20, 2014 by Sandillio Sandy • edited Aug 28, 2014 by Sandillio Sandy

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0