Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2007-12-06
13
Medium Priority
?
2,428 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
11 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
What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

 

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

NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

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 (it really isn't that hard to do) Recursive SQL is most often used to convert columns to rows or rows to columns.  A previous article described the process of converting rows to columns.  This article will build off of th…
Integration Management Part 2
Despite its rising prevalence in the business world, "the cloud" is still misunderstood. Some companies still believe common misconceptions about lack of security in cloud solutions and many misuses of cloud storage options still occur every day. …
Suggested Courses

824 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