If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > Parameter for DB2 ODBC

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 03-25-10, 06:48
cineFreak cineFreak is offline
Registered User
 
Join Date: Oct 2006
Posts: 12
Question Parameter for DB2 ODBC

Hello everybody...

I have a tricky problem I'm fighting with since a long time.
We have a very old db2 installation (DB2 5.2) on a old AIX 4.3 system.
This system contains the data of an old product management system.

Now the time is finally comming that we want to kill this old system.
We want to export all the data from the db2 and import it for backup in a PostgreSQL database.

For this I have installed the ODBC driver for db2 (this is the driver from the version 5.2, an actual driver never worked with the old database) and use Microsoft Access to link the tables.
Those linked tables I export in Access to the ODBC interface of PostgreSQL.
This works for the most tables very fine, but I have one tricky table which generates allways the error "CLI0002W" which indicates that the driver is truncating data because of insufficient buffer size.

I looked at the description of the table and think I found the problem.
This table contains a column with "LONG VARCHAR 32700".
In this column the user write comments about changes of a part which is managed in the application.

Has someone an idea how I can solve this problem?
I think a parameter in the db2cli.ini could solve the problem of insufficient buffer size, but I didn't find anything with google (or I searched the wrong way )

Any help would be very appreciated

Best regards
Raphael
Reply With Quote
  #2 (permalink)  
Old 03-27-10, 10:52
cineFreak cineFreak is offline
Registered User
 
Join Date: Oct 2006
Posts: 12
Well, after some more search for a solution, I didn't find any way to solve my problem in the described way... But I made an interesting watching and found a workaround for my problem I would like to share...

I tried many different settings in the db2cli.ini which I found in other forums and the IBM website, but it seems that Access always connects with an own connection string through the ODBC driver to the database, also with its own buffer settings which was always to small for the big column in the table.

After many attempts to transfer the data over Access directly I tried to import the data in Excel over the ODBC source. I watched the import in the ODBC trace file and was very surprised that I never get the CLI0002W error message until the import was complete
So I had nothing more to do to save the Excelsheet and import this file in Access, so I had an table which I could export from Access to PostgreSQL

I know, this is definitely not the way I wanted to solve my problem and it's also not the most beautiful solution, but it works for me

Nice weekend to all
Raphael
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On