473,466 Members | 1,527 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

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 8042
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...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

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.