If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > Need to move data from a DB2 to SQL server

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 08-18-06, 17:34
desineo desineo is offline
Registered User
 
Join Date: Aug 2006
Posts: 3
Need to move data from a DB2 to SQL server

All,

Is there a way in DB2 to export a big database(arnd 7GB) with around 500 tables to a delimited text file or in a format that is easily importable through SQL server on a windows machine.

Has anybody ever used db2move/db2look..looks like it exports data into pc/ixf
format..any idea if this can help me acheive this task..


Appreciate any help/suggestions in this matter..thanks in advance...
Reply With Quote
  #2 (permalink)  
Old 08-20-06, 14:41
Peter.Vanroose Peter.Vanroose is offline
Registered User
 
Join Date: Sep 2004
Location: Belgium
Posts: 1,079
Yes, db2move should indeed do the job.
Remember to duplicate also any aliases, views, triggers, user-defined functions, ...
I've never used the ixf file format so I'm not sure if it will be loadable by SQLServer. You should maybe first try out the whole chain with a single table to check this.

For a finer control over tables, file format, etc. you can also directly use the export utility (and e.g. use the DEL file format). You could use the list of table names generated by db2move.
__________________
--_Peter Vanroose,
__IBM Certified Database Administrator, DB2 9 for z/OS
__IBM Certified Application Developer
__ABIS Training and Consulting
__http://www.abis.be/
Reply With Quote
  #3 (permalink)  
Old 08-21-06, 14:13
sharrisdb2 sharrisdb2 is offline
Registered User
 
Join Date: Jul 2005
Location: Irvine, CA
Posts: 23
Unless I am mistaken, it looks like you only want to move data, not structures.

You can use the db2 export utility to export each table. Do not use the IXF format with MS SQL Server unless you want to be extremely frustrated. It only works with DB2. You'll need to use DEL (delimited), but be careful. Any apostrophies and or commas in you text will ruin the export. You may have to chose a nonsense set of delimiters and text qualifiers. I've tried the pipe "|", the tilde "~", the hat accent or whetever it's called "^", and other ASCII characters that are not commonly used. It's all trial and error.

You can use the syscat.tables view to get a list of tables to export. Use this to build your export statements.

Hope this helps somewhat.

-- Steve
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On