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 > Loading TAB delimited Data in DB2 8.1

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 05-24-04, 08:58
nitingm nitingm is offline
Registered User
 
Join Date: Jul 2003
Location: Austin, TX, USA
Posts: 278
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
Reply With Quote
  #2 (permalink)  
Old 05-24-04, 09:41
sathyaram_s sathyaram_s is online now
Super Moderator
 
Join Date: Aug 2001
Location: UK
Posts: 4,534
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.
Reply With Quote
  #3 (permalink)  
Old 05-24-04, 12:53
famudba famudba is offline
Registered User
 
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
Reply With Quote
  #4 (permalink)  
Old 05-24-04, 13:36
bmujeeb bmujeeb is offline
Registered User
 
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
Reply With Quote
  #5 (permalink)  
Old 05-25-04, 00:47
nitingm nitingm is offline
Registered User
 
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.
__________________
HTH

Nitin

Ask the experienced rather than the learned

Last edited by nitingm; 05-25-04 at 00:49.
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