473,770 Members | 2,028 Online
Bytes | Software Development & Data Engineering Community
+ 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 8072
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.6418 4$Hg2.53852@att bi_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.3333333333330 0003 (tested on MSSQL2000 sp3a)
DB2: +3.333333333333 333E-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 (YourOLEDBfunct ion)
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.6418 4$Hg2.53852@att bi_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.3333333333330 0003 (tested on MSSQL2000 sp3a)
DB2: +3.333333333333 333E-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 (YourOLEDBfunct ion)
3) Load from c of cursor insert into ...

HTH,

Jean-Marc

Nov 12 '05 #4
"Murty" <ad***@comcast. net> wrote in message
news:DLqBc.8319 2$HG.69871@attb i_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.831 92$HG.69871@att bi_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
3765
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 transfer of data using DTS? If not DTS then what would you suggest I transfer data with? Thank you
6
7664
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 kit and created them in DB2 but having tough time in transferring the data. There are tons of identity colums (GENERATE ALWAYS AS IDENTITY) in these tables.
1
2681
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 (http://msdn.microsoft.com/asp.net/using/migrating/aspmig/aspmigasst/default ..aspx). Everything works fine when my include file is in the same directory as the asp file that includes the include file. What I am having trouble with is that the migration tool doesn't see my include file when it resids in a...
1
2070
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 provide me their own specific points? Any help will be appreciated. TIA
2
2757
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 think you can only migrate data to a DB2 database with that. Thank you. Sincerely,
11
2578
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
1282
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, does anyone know of any industry practices for the percentage of data to be verified for certain record size. For example, small sys: 0 to 1million records (1%) medium sys: 1 to 10million records (5%) large sys: 10million records and above...
0
2170
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 from the del file to mysql table, it generate an error. below is the load data infile syntax i use =
1
2725
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 anyone know any steps on how to migrate? Is there anyone know a script for automated migration?
0
9454
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10260
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9906
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8933
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7456
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6712
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5354
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4007
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 we have to send another system
3
2850
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.