Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

How to convert  a DB2 database to MS SQL server database ?

Posted on 2007-12-06
13
Medium Priority
?
2,425 Views
Last Modified: 2011-09-20
Hello,
I have some DB2 tables and I want to migrate the table to MS SQL server? Is there an easy to do this?

Thanks so much for your suggestion,
Regards,
lilyyan
0
Comment
Question by:lilyyan
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
13 Comments
 
LVL 46

Accepted Solution

by:
Kent Olsen earned 320 total points
ID: 20420328
Hi lilyyan,

Well, for my money, such a migration is a mistake.  :)  But that's not the question, is it?    ;)

I don't know of any tools specifically designed to migrate DB2 to SQL Server.  IBM certainly doesn't have tools to help people LEAVE their platforms, just as Oracle and Microsoft don't make it easy to leave their systems.

That said, there are a lot of tools out there to generate the base SQL to generate the tables, indexes, views, and related objects.  The DB2LOOK utility can do this for you.  The resulting SQL will have to be edited slightly where proprietary extensions are used.  Things like IDENTITY columns.  The SQL Server syntax is different.

Move the data is a different issue.  You should be able to dump the data from DB2 as a CSV or tab delimited file, then load it into SQL Server.  If your data volume is modest, you may be able to use ACCESS to link to both databases, generate the tables in SQL Server, and move the data.



Good Luck,
Kent
0
 

Author Comment

by:lilyyan
ID: 20420647
HI Kent,

Thanks for your reply. so the basic steps for the data migration is to: use DB2LOOK to generate SQL statment, then generate a CSV file and trnsfer to MS SQL server?
lilyyan
0
 
LVL 37

Expert Comment

by:momi_sabag
ID: 20420662
what version of sql server do you run ?
you can try to do it using DTS (in sql 2000) or SSIS (in sql 2005)
these tools should make the movement of data rather simple,
i believe you will also be able to create the destination tables in sql server using these tools and you won't have to spend time on converting db2's syntax to sql server's
0
TCP/IP Network Protocol Cheat Sheet

TCP/IP is a set of network protocols which is best known for connecting the machines that make up the Internet. The truth is that TCP/IP is one of the oldest network protocols and its survival is mainly based on its simplicity and universality.

 

Author Comment

by:lilyyan
ID: 20420755
HI Momi,

Thanks for your reply. I'm using sql 2000. could you explain a little more about DTS ? How to use it?
lilyyan


0
 
LVL 17

Assisted Solution

by:pssandhu
pssandhu earned 320 total points
ID: 20421205
Hey:
Check this link out. http://www.microsoft.com/technet/prodtechnol/sql/2000/deploy/dtssql2k.mspx

It will give you an idea on how it works. You will have to do some reading since it is not easy to write the whole thing out.

P.
0
 
LVL 13

Assisted Solution

by:ghp7000
ghp7000 earned 320 total points
ID: 20430725
headache job, all kinds of got yas can be involved, depending upon the complexity of the data and the tables. Can u explain whatyou hope to accomplish by moving the db to sql server?
0
 

Author Comment

by:lilyyan
ID: 20442879
Hi, thanks for the replies.  I want the table and the data to be moved to MS sql server. I do find the DTS tool in ms sql Entreprise Managar. not sure how to ue it yet. any suggestion? Thanks very much!
0
 
LVL 37

Assisted Solution

by:momi_sabag
momi_sabag earned 320 total points
ID: 20442961
you need to map the source db2 tables to sources using odbc driver
then you need to define the target tables in ms sql using either type of connectivity  you want (odbc / native etc)
and then map the column to one another
you can try to use the wizards there, they are very simple and self explanatory
0
 

Author Comment

by:lilyyan
ID: 20445094
Hi, thanks much for your reply.

how to map the source db2 tables to sources using odbc driver? did mean register a db2 server.?
(my pc has db2 management and development tools installed)

0
 
LVL 37

Expert Comment

by:momi_sabag
ID: 20450569
inside your sql server client, you should create a new dts package
and follow the wizards
you don't use db2 tools here
0
 

Assisted Solution

by:MarkGho
MarkGho earned 320 total points
ID: 21265072
IBM purchased a company called Datamirror.  It allows real time conversion of DB2 to SQL.
0

Featured Post

Setting up LaraDock for Laravel

Learn how to set up LaraDock in a Laravel project - LaraDock gives us an easy way to run a Laravel application using Docker in a single command.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

November 2009 Recently, a question came up in the DB2 forum regarding the date format in DB2 UDB for AS/400.  Apparently in UDB LUW (Linux/Unix/Windows), the date format is a system-wide setting, and is not controlled at the session level.  I'm n…
Recursive SQL in UDB/LUW (you can use 'recursive' and 'SQL' in the same sentence) A growing number of database queries lend themselves to recursive solutions.  It's not always easy to spot when recursion is called for, especially for people una…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …

715 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question