Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Loading DB2 CLOB data into SQL Server 2008 R2 SP1


Loading DB2 CLOB data into SQL Server 2008 R2 SP1

Author
Message
henro.smit
henro.smit
Forum Newbie
Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)

Group: General Forum Members
Points: 4 Visits: 21
We are developing a process that sources a CLOB field from Db2, and inserts it into a SQL Server database.

The CLOB data size can be up to 50MB and it contains data stored in XML format. The aim of the process is 1. To get the data from Db2 into SQL Server 2. To "unpack" the values in the XML, using XQuery 3. To load the "unpacked" values into seperate table columns.

To give some background. The values in the CLOB field contains Importer / Exporter information and is grouped as Commodity items in the Clob field. There will be anything from 1 - 10000 Commodity items and their associated values inside the CLOB field.

For development purposes, the data we received from source was limited to 5 items. Everything looked fine, until they started to increase the number of items sent through. This obvioulsy increase the size of the CLOB field.

The result was that all the CLOB values, where the umber of items exceeded 5 items, were loaded into SQL Server as a NULL value. Just to emphasise, the larger CLOB values are not written to SQL Server, the column is NULL in SQL Server

I am therefore convinced that the size of the CLOB field has something to do with this. I was under the impression that VARCHAR(MAX) could handle up to 2GIG.

We have tried the following things, without sucess.

1. Played around with datatypes CLOB - NTEXT, CLOB - NVARCHAR(MAX), CLOB - TEXT, CLOB - VACHAR (MAX). No luck.

2. We even set up a linked server, and tried doing this wth an Openquery statement. Also no luck.

Is there anything else we should look at, sp_tableoption settings etc. ?

We are not very experienced in SQL Server and SSIS. The client forced us to replatform. Any help would be appreciated. Unfortunately I cannot include more info or code snippets. It is all considered to be sensitive info.
Stewart "Arturius" Campbell
Stewart "Arturius" Campbell
SSCertifiable
SSCertifiable (5.8K reputation)SSCertifiable (5.8K reputation)SSCertifiable (5.8K reputation)SSCertifiable (5.8K reputation)SSCertifiable (5.8K reputation)SSCertifiable (5.8K reputation)SSCertifiable (5.8K reputation)SSCertifiable (5.8K reputation)

Group: General Forum Members
Points: 5775 Visits: 7130
The Large Object data types (viz. VARCHAR(MAX), NVARCHAR(MAX), VARBINARY(MAX) and XML) can cater for up to 2GB of data.

The issue may be with the ODBC or OLEDB connections used by the linked server.

____________________________________________
Space, the final frontier? not any more...
All limits henceforth are self-imposed.
“libera tute vulgaris ex”
henro.smit
henro.smit
Forum Newbie
Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)

Group: General Forum Members
Points: 4 Visits: 21
Thanks for your post. It was indeed a driver issue.

The correct driver to use is the DB2 OLEDB/.Net provider with the datatype set to NTEXT.

It also is much faster than using OPENQUERY with a linked server to Db2.
kriskumaresh
kriskumaresh
Forum Newbie
Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)

Group: General Forum Members
Points: 1 Visits: 1
Hi,

Could you please let me know a little more detail about the DB2 OLEDB/.net provider driver? I see a bunch of them at our shop. Which vendor provided this driver? IBM or Microsoft? What's the version of the driver?

Thanks !!
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search