Results 1 to 5 of 5
  1. #1
    Join Date
    Jul 2003
    Location
    Austin, TX, USA
    Posts
    278

    Unanswered: Loading TAB delimited Data in DB2 8.1

    Hi,

    I am in the process of migrating an Oracle Database to DB2. I know I can use the MTK for the project however as my servers are not on the same network the process is very slow.

    I have been able to export the data to tab delimted files using TOAD.

    I need some clues.

    1. Does anyone know where to specify a delimiter like ';' in toad?

    2. Any clues how to load this tab delimited files to my db2 tables.

    I am using DB2 8.1.4 (FixPack 4a) on windows 2000.

    Thanks in Advance
    HTH

    Nitin

    Ask the experienced rather than the learned

  2. #2
    Join Date
    Aug 2001
    Location
    UK
    Posts
    4,650
    for ;
    load from abcd.del of del modified by coldel; insert into table1

    for tab

    load from abcd.del of del modified by coldel0x09 insert into table1

    HTH

    Sathyaram
    Visit the new-look IDUG Website , register to gain access to the excellent content.

  3. #3
    Join Date
    Jan 2004
    Location
    Tallahassee, FL, USA
    Posts
    96
    Nitin,


    If you porting data from Oracle to DB2 , don't use Toad or any 3rd party tools


    get tables desc,


    put in select statement

    example

    tab1 structure as below

    ID number
    DESC VARCHAR2(30)
    ST_DT DATE
    SAL DEcimal (9,2)


    spool tab1.dat
    set pagesize 100000
    set head off
    select to_char(id)||','||desc||','||to_date(st_dt,'YYYY-MM-DD')||','||to_char(sal) from tab1 ;
    spool off


    use tab1.dat input file for DB2 load utility with delimeter ,

    that will work, when I migrated data from Oracle8i solaris to DB2 UDB V8 AIX, I used above methed.


    Also I have scripts do all layers, like getting structure from oracle, converting into DB2 UDB format , create instance,DB,bufferpools, tablespaces & schema in DB2 based on oracle DB layout, port data in to DB2.

    that scripts contains Oracle stored procedures, Java , shell scripts.


    plan to add even create file system , that is in process


    Lekharaju Ennam
    Certified Oracle8i & DB2 UDB DBA

  4. #4
    Join Date
    Mar 2004
    Posts
    448
    There are some scripts that I get from ibm site that worked for me.
    These scripts shows you exactly what you are doing, they don't use any third party tools , just simple SQL and other built-in utilities. I don't have the link,
    but I have them in zip files.let me know if you want them.

    regards,

    mujeeb

  5. #5
    Join Date
    Jul 2003
    Location
    Austin, TX, USA
    Posts
    278

    Thanks To Everyone.

    Thanks a lot guys now I know what I can do and its really simple.

    Mujeeb would really appreciate if you can email me the zip file at nmaker@symphonysv.com or upload it to the dbforums site.


    Lekharaju would be great if you could also share your scripts with us.
    Thanks Again.
    Last edited by nitingm; 05-25-04 at 01:49.
    HTH

    Nitin

    Ask the experienced rather than the learned

Posting Permissions

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