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 > AS400 DB2 -> UDB (PC)???

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 05-21-04, 07:58
Mgo Mgo is offline
Registered User
 
Join Date: May 2004
Posts: 4
AS400 DB2 -> UDB (PC)???

Hi!
I'm new here.
My question may be silly for some admins, but i don't find any hints:
I want to convert/migrate/move a db/2-database from AS400 to UDB on a Server. The Problem is ... this db has about 600 tables and no one wants to create 600 new tables at the UDB (for unload and load). Therefore my question: is there a tool/strateqy or idea to "backup" the AS400-db and restore it completly (structure and data) on the UDB-Server. INHO there must be an easy way, because it's both from IBM.

Thank you for your help.
Marco.

PS: i'm sorry for my bad english
Reply With Quote
  #2 (permalink)  
Old 05-21-04, 09:16
J Petruk J Petruk is offline
Registered User
 
Join Date: Mar 2004
Location: Toronto, ON, Canada
Posts: 513
Quote:
Originally Posted by Mgo
INHO there must be an easy way, because it's both from IBM.
Funny

I don't think there is a way, definately a backup would not work, and I don't think db2move has an AS/400 equivalent that's compatible with db2/windows. Someone may correct me.

Can AS/400 db2 export IXFs? You can write a few scripts that should get it done with "IMPORT... CREATE INTO...", provided the tables aren't too huge. (use commitcount, too, to prevent log fulls)

Maybe db2look for as/400? db2 connect then use datajoiner to do an INSERT...SELECT?
__________________
--
Jonathan Petruk
DB2 Database Consultant
Reply With Quote
  #3 (permalink)  
Old 05-24-04, 04:17
lahiru lahiru is offline
Registered User
 
Join Date: Apr 2004
Posts: 13
read readbooks from IBM "Advanced Functions and Administration on DB2 Universal Database for iSeries" Chapter 6 section 6.5. This should work out for u.
Reply With Quote
  #4 (permalink)  
Old 05-24-04, 05:56
Mgo Mgo is offline
Registered User
 
Join Date: May 2004
Posts: 4
seperat DB-strukture/DB-data export ???

Hi lahirm,
hi Jonathan,
thank you for your hints.

Seems as if there is no easy way to transfer the DB-structure and DB-Data in one export/import step ?

In the IBM-Paper is only the export/import for the data to existing tables described. Therefor i have to create the all the 600 tables first.
Is this the right conclusion ?

Marco.
Reply With Quote
  #5 (permalink)  
Old 05-24-04, 06:03
lahiru lahiru is offline
Registered User
 
Join Date: Apr 2004
Posts: 13
Cool

Hi,

Did u read the section I told u? In the UDB IMPORT utility u can specify whether just to INSERT or CREATE and INSERT the exported data. I have already done the same thing between V5R2 iSeries and UDB 8.1.5. The only difference was there were few tables and i did it table by table.

Lahiru.
Reply With Quote
  #6 (permalink)  
Old 05-24-04, 06:49
Mgo Mgo is offline
Registered User
 
Join Date: May 2004
Posts: 4
Thanks!

Sure i did ...
but i did't see it.
But now (thanx!) i think i got it, you mean this, don't you:
"IMPORT FROM C:\TEMP \DEF_FILE OF DEF CREATE INTO DB2ADMIN.TARGETTABLE2"

Marco.
Reply With Quote
  #7 (permalink)  
Old 05-24-04, 06:54
lahiru lahiru is offline
Registered User
 
Join Date: Apr 2004
Posts: 13
Talking

Exactlly. Is this the one that you wanted ?
Reply With Quote
  #8 (permalink)  
Old 05-24-04, 07:03
Mgo Mgo is offline
Registered User
 
Join Date: May 2004
Posts: 4
That's exactly what i want at the target-system (UDB). Thanx a lot.

But i need to make this IXF-Files on the AS400. I'm not an db-admin and i never worked with a AS400. Okay, the select-statement are no problem, but can all AS400 create IXF-Files, or is there a problem at older versions ? (The target-system (UDB) is nearly up-to-date V.8).

Marco.
Reply With Quote
  #9 (permalink)  
Old 05-24-04, 07:15
lahiru lahiru is offline
Registered User
 
Join Date: Apr 2004
Posts: 13
Post

I haven't tried this on versions older the iSeries V5R2 and UDB 8.1.5. But logically it should work becase this seems to be a basic function in DB2. Further u can clarify the versions supportablity by reading up the DB2 iSeries readbooks.

Try to configure UDB Contorl Center tool to AS/400 DB.(Sorry i haven't tried this but i will be doing so before end of the day.) If u could configure the tool then u can easily work with that tool to do all your Import and Export activities using the GUI without bothering about your AS 400 knowledge.

I hope u have the DB2 UDB windows Client installation, which has this GUI.

Lahiru.
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