472,983 Members | 2,614 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,983 software developers and data experts.

data migration question - MS SQL to DB2

We are trying to migrate a MS SQL server app to DB2 8.1 Linux platform.
Our database has got about 300+tables with total size - 150 GB

We are using MS SQL's BCP utility to extract data from MS SQL's tables
and loading into DB2
using DB2's LOAD utility. There are tons of colums of floating point
types (singe precion & double precision types)
in the database and when extracted using BCP, it generates data only upto
17 digits. In other words, data for
floating point data types is not being copied with 100 %accuracy with BCP &
LOAD approach.

We though of using MS SQL's DTS data migration utitliy but it is
practilcally impossible to migrate huge amounts
of data using DTS, as it is too slow.

Any suggestions are greatly appreciated.

Thanks
Murty

Nov 12 '05 #1
7 8002
On Sun, 20 Jun 2004 15:42:25 UTC, "Dave" <ad***@comcast.net> wrote:
We are trying to migrate a MS SQL server app to DB2 8.1 Linux platform.
Our database has got about 300+tables with total size - 150 GB

We are using MS SQL's BCP utility to extract data from MS SQL's tables
and loading into DB2
using DB2's LOAD utility. There are tons of colums of floating point
types (singe precion & double precision types)
in the database and when extracted using BCP, it generates data only upto
17 digits. In other words, data for
floating point data types is not being copied with 100 %accuracy with BCP &
LOAD approach.

We though of using MS SQL's DTS data migration utitliy but it is
practilcally impossible to migrate huge amounts
of data using DTS, as it is too slow.

Any suggestions are greatly appreciated.

Thanks
Murty


Have you tried to use DB2's "federated" database capability. You
should be able to use that to see the MSSQL tables from within DB2
just use insert... select.. to move the data inot native dB2 tables.

--
Lorne Sunley
Nov 12 '05 #2
"Dave" <ad***@comcast.net> a écrit dans le message de
news:BfiBc.64184$Hg2.53852@attbi_s04...
We are trying to migrate a MS SQL server app to DB2 8.1 Linux platform.
Our database has got about 300+tables with total size - 150 GB

We are using MS SQL's BCP utility to extract data from MS SQL's tables
and loading into DB2
using DB2's LOAD utility. There are tons of colums of floating point
types (singe precion & double precision types)
in the database and when extracted using BCP, it generates data only upto 17 digits. In other words, data for
floating point data types is not being copied with 100 %accuracy with BCP & LOAD approach.

We though of using MS SQL's DTS data migration utitliy but it is
practilcally impossible to migrate huge amounts
of data using DTS, as it is too slow.

Any suggestions are greatly appreciated.

Thanks
Murty

Hi Murty,

Well, if you create a mono column table on MS SQL with float and do the same
on DB2 UDB, inserting values(1.0/3) and select the result, you'll get:

MS: 0.33333333333300003 (tested on MSSQL2000 sp3a)
DB2: +3.333333333333333E-001 (tested on V8.1 FP5 same computer)

So at base, it seems to me you will not get your 100% accuracy.

To transfer data anyway, you could maybe use an OLEDB table function (you
can esaily create one thru the Development Center) and a LOAD from cursor:

1) create OLEDB table function
2) declare c cursor for select * from table (YourOLEDBfunction)
3) Load from c of cursor insert into ...

HTH,

Jean-Marc
Nov 12 '05 #3
Hi Jean-Marc & Lorne,

We actually thought about DB2's federated capability (I think it needs
DB2's Information Integration s/w),
writing a Java program to directly transfer from MS SQL table to DB2, or
using MS SQL's DTS data migration tool
etc but these solutions would work fine, if the table size is not too
huge.
Some of our tables are really huge ( @ 40 GB) and we need to make sure
we would not run into filling up
transaction logs and aslo we need to complete the data migration in a
fixed time-frame on the date of
real production migration. Taking these constraints into consideration, we
though of taking BCP & LOAD
route which seems to be the quickest way of data transfer but we hit on the
issue with floating proint data types.

Any idea of what IBM's recommended way of data transfer from external
databases to DB2 ?

Thanks
Murty
"Jean-Marc Blaise" <no****@nowhere.com> wrote in message
news:cb**********@news-reader4.wanadoo.fr...
"Dave" <ad***@comcast.net> a écrit dans le message de
news:BfiBc.64184$Hg2.53852@attbi_s04...
We are trying to migrate a MS SQL server app to DB2 8.1 Linux platform.
Our database has got about 300+tables with total size - 150 GB

We are using MS SQL's BCP utility to extract data from MS SQL's tables and loading into DB2
using DB2's LOAD utility. There are tons of colums of floating point types (singe precion & double precision types)
in the database and when extracted using BCP, it generates data only upto
17 digits. In other words, data for
floating point data types is not being copied with 100 %accuracy with

BCP &
LOAD approach.

We though of using MS SQL's DTS data migration utitliy but it is
practilcally impossible to migrate huge amounts
of data using DTS, as it is too slow.

Any suggestions are greatly appreciated.

Thanks
Murty
Hi Murty,

Well, if you create a mono column table on MS SQL with float and do the

same on DB2 UDB, inserting values(1.0/3) and select the result, you'll get:

MS: 0.33333333333300003 (tested on MSSQL2000 sp3a)
DB2: +3.333333333333333E-001 (tested on V8.1 FP5 same computer)

So at base, it seems to me you will not get your 100% accuracy.

To transfer data anyway, you could maybe use an OLEDB table function (you
can esaily create one thru the Development Center) and a LOAD from cursor:

1) create OLEDB table function
2) declare c cursor for select * from table (YourOLEDBfunction)
3) Load from c of cursor insert into ...

HTH,

Jean-Marc

Nov 12 '05 #4
"Murty" <ad***@comcast.net> wrote in message
news:DLqBc.83192$HG.69871@attbi_s53...
Hi Jean-Marc & Lorne,

We actually thought about DB2's federated capability (I think it needs
DB2's Information Integration s/w),
writing a Java program to directly transfer from MS SQL table to DB2, or
using MS SQL's DTS data migration tool
etc but these solutions would work fine, if the table size is not too
huge.
Some of our tables are really huge ( @ 40 GB) and we need to make sure
we would not run into filling up
transaction logs and aslo we need to complete the data migration in a
fixed time-frame on the date of
real production migration. Taking these constraints into consideration, we though of taking BCP & LOAD
route which seems to be the quickest way of data transfer but we hit on the issue with floating proint data types.

Any idea of what IBM's recommended way of data transfer from external
databases to DB2 ?

Thanks
Murty

Is there some way to cast the data into a different data type within MS SQL
Server so that it will export correctly?

In general, since this a BCP problem you might ask the question on a MS SQL
Server newsgroup or forum. There are some good forums on www.dbforums.com
Nov 12 '05 #5
Have you considered using teh migration toolkits for MS SQL Server?
You can find it of the DB2 homepage and it's free.

Cheers
Serge
--
Serge Rielau
DB2 SQL Compiler Development
IBM Toronto Lab
Nov 12 '05 #6
"Murty" <ad***@comcast.net> wrote in message news:<DLqBc.83192$HG.69871@attbi_s53>...
Hi Jean-Marc & Lorne,

We actually thought about DB2's federated capability (I think it needs
DB2's Information Integration s/w),
writing a Java program to directly transfer from MS SQL table to DB2, or
using MS SQL's DTS data migration tool
etc but these solutions would work fine, if the table size is not too
huge.
Some of our tables are really huge ( @ 40 GB) and we need to make sure
we would not run into filling up
transaction logs and aslo we need to complete the data migration in a
fixed time-frame on the date of
real production migration. Taking these constraints into consideration, we
though of taking BCP & LOAD
route which seems to be the quickest way of data transfer but we hit on the
issue with floating proint data types.

Any idea of what IBM's recommended way of data transfer from external
databases to DB2 ?


I don't think there's a single recommended method - it all probably
depends on a variety of factors. As you pointed out - load is going
to be the fastest. And as someone else mentioned - you can load from
a cursor - which I assume could point to SQL Server with the right
software.

But there are two other custom software scenarios to consider:

#1 create a custom app to export the float from sql server into a
format you can load from db2.

#2 copy the data from sql server to db2 transactionally. This will
take longer, though insertion rates of 1000+ rows / second is
reasonable on modern small servers. You can get around the
transaction log limitations several ways:
a. declare the table not logged initially
b. commit every 10-100k rows
Nov 12 '05 #7
Dave,

Take a look at "SQL Server books online" at the "float and real"
datatype section.
It states that float has a precision of 15 digits.
But SQL Server represents 53. Why that is is beyond me.
It challenges everything my highschool math teacher ever taught me...
Either way I don't believe you will loose precision when moving to DB2.
If, however you think you do you could transfer the data as binary (8
Byte). On the DB2 side a simple C-UDF should do to convert the
VARCHAR(8) FOR BIT DATA back into FLOAT (out = *((double *) &in)).
On the SQL Server side whatever can be used to expose the internal
structure of the float.
That way you should end up with exactly the same data in DB2 as in SQL
Server, even though DB2 will still only display significant digits (as
it should).

Cheers
Serge

PS: Watch those little/big endians if you move from Intel to Unix

--
Serge Rielau
DB2 SQL Compiler Development
IBM Toronto Lab
Nov 12 '05 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: serge | last post by:
I am doing a test on migrating an Oracle 8i database to SQL 2000. I've never done this before and I would like to find out if there are any complications or side effects if I try doing the...
6
by: Dave | last post by:
Hi We need to migratedata for about 300 tables from MS SQL server database to Linux DB2 V8.1. Total size of all 300 tables is @ 3 GB. We have converted tables DDL using IBM migration tool...
1
by: rob | last post by:
Dear All, I have a very small test project to convert asp to asp.net using the Microsoft/Artisan ASP to ASP.NET Migration Assistant...
1
by: pankaj_wolfhunter | last post by:
Greeting, Can anyone tell me the points to keep in mind while migrating data from Sybase to DB2 especially in case of LOB data. I know the books available on the IBM site, but if still someone can...
2
by: contact1981 | last post by:
Hello, I am trying to migrate data from a DB2 database to SQL Server 2005 database. Does anyone know about any migration tool that does that? I have heard about DB2 Migration Tool kit, but I...
11
by: Chad | last post by:
Hi Is it possible to substitute an alternative data source (eg MySQL or SQL Server) into an existing MS-Access application?
1
by: donut | last post by:
Hi, i am currently preparing a Data Migration Plan for migration of existing data from ADABAS to DB2. The data volume can be as huge as 200 GB. Since it is impossible to verify all the data migrated,...
0
by: lanesbalik | last post by:
hi all, right now i'm trying to migrate from db2 running under linux to mysql v5.1. i manage to export out the db2 structure & data into a del (ascii) file. but when i try to load the data...
1
by: lion cave | last post by:
hi, I'm using postgreSQL and php. I am assigned for migration of data of database. I would like to ask a help if how to migrate the data from the Postgre 8.0 to the Postgre 8.3. Is there...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: Aliciasmith | last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
2
by: giovanniandrean | last post by:
The energy model is structured as follows and uses excel sheets to give input data: 1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 1 Nov 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM) Please note that the UK and Europe revert to winter time on...
3
by: nia12 | last post by:
Hi there, I am very new to Access so apologies if any of this is obvious/not clear. I am creating a data collection tool for health care employees to complete. It consists of a number of...
0
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...
0
isladogs
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.