Results 1 to 3 of 3
  1. #1
    Join Date
    Aug 2006
    Posts
    3

    Unanswered: 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...

  2. #2
    Join Date
    Sep 2004
    Location
    Belgium
    Posts
    1,126
    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/

  3. #3
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •