Monday, February 20, 2012

Linked Server to DB2

Hi,

I have set up Linked Server to DB2 using MS OLEDB FOR ODBC DRIVER (MSDASQL) i am able to execute select, insert and delete but there are few tables in DB2 where data type of some of the columns is CLOB.

I am not able to select, update or insert in to the DB2 tables. I guess it is the problem of data type mismatch between SQL Server and DB2. Can any body help me how to select DB2's CLOB data type in SQL Server through OPENQUERY and how to insert a text data value into DB2 CLOB data type column.

Currently when i Insert the following error is encountered :

OLE DB provider "MSDASQL" for linked server "TRYLINK" returned message "Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done.".

Msg 7344, Level 16, State 1, Line 1

The OLE DB provider "MSDASQL" for linked server "TRYLINK" could not INSERT INTO table "[MSDASQL]" because of column "MEMO_FALSEPOSITIVE". Could not convert the data value due to reasons other than sign mismatch or overflow.

When i try to select a CLOB column in DB2 the following error is encountered:

OLE DB provider "MSDASQL" for linked server "TRYLINK" returned message "Requested conversion is not supported.".

Msg 7341, Level 16, State 2, Line 1

Cannot get the current row value of column "[MSDASQL].MEMO_VULNERABILITYSOLUTION" from OLE DB provider "MSDASQL" for linked server "TRYLINK".

Thanks in advance for any answer.

AshwinHi Ashwin, I am trying to setup a Linked Server to DB2 using the same driver. Can you please email me the screen shot of your settings or the script to create it?

Thanks,

Matt

Quote:

Originally Posted by ashwingawande

Hi,

I have set up Linked Server to DB2 using MS OLEDB FOR ODBC DRIVER (MSDASQL) i am able to execute select, insert and delete but there are few tables in DB2 where data type of some of the columns is CLOB.

I am not able to select, update or insert in to the DB2 tables. I guess it is the problem of data type mismatch between SQL Server and DB2. Can any body help me how to select DB2's CLOB data type in SQL Server through OPENQUERY and how to insert a text data value into DB2 CLOB data type column.

Currently when i Insert the following error is encountered :

OLE DB provider "MSDASQL" for linked server "TRYLINK" returned message "Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done.".

Msg 7344, Level 16, State 1, Line 1

The OLE DB provider "MSDASQL" for linked server "TRYLINK" could not INSERT INTO table "[MSDASQL]" because of column "MEMO_FALSEPOSITIVE". Could not convert the data value due to reasons other than sign mismatch or overflow.

When i try to select a CLOB column in DB2 the following error is encountered:

OLE DB provider "MSDASQL" for linked server "TRYLINK" returned message "Requested conversion is not supported.".

Msg 7341, Level 16, State 2, Line 1

Cannot get the current row value of column "[MSDASQL].MEMO_VULNERABILITYSOLUTION" from OLE DB provider "MSDASQL" for linked server "TRYLINK".

Thanks in advance for any answer.

Ashwin

No comments:

Post a Comment