Solved

How do I DUMP a DB2 database?

Posted on 2004-10-12
5
3,010 Views
1 Endorsement
Last Modified: 2008-03-06
I have some recent experience with MySQL, none with DB2.  We need to aquire a complete database from a client and re-create it on our own system.  The client's database system is DB2 and is on an AS/400 system.  In talking to the client's contact guy, we asked him to DUMP his database and send it to us so we could put it on our development system, but he wasn't sure what we meant.  I was under the impression that DB2 is SQL-compliant (if that's the right phrase).  If so, I would have thought that DUMP (and CREATE, when we get it) would work.  Is this guy just unaware of the DUMP command or is IBM's DB2 different?

If DUMP doesn't work, then can someone recommend a scheme which will work?  In the short term, we wish to install the database on a Linux server.  We can put DB2 on this system if necessary.  In that case, we'd just need to know the right way to ask the client to provide an image of his database to us.  We'd really rather not go this route if we can avoid it because we're on a very short timeline and the additional time to add DB2, set it up, learn the ins and outs, etc. will consume a lot of time.

Have I left anything out?

Thanks!

--Brian M. Godfrey
1
Comment
Question by:BrianGodfrey
  • 2
  • 2
5 Comments
 
LVL 13

Assisted Solution

by:ghp7000
ghp7000 earned 300 total points
ID: 12291737
easiest way is for client to export  the ddl for the database into a file and then you can re create the database on your linux machine with the file created by the 'dump' of the ddl.
If your client doesn't know how to 'dump' the ddl, please find out if they know how to use the control center or the command line.
The above is one approach, one drawback is that the ddl file wont contain any data. If you need some data as well, then you could have them export the data into files and then you could load these files into the linux database. If they have hundreds of tables though, this approach isnt practible and you'll need a different solution.
0
 

Author Comment

by:BrianGodfrey
ID: 12304049
A co-worker found this suggestion.  How does it sound?:

   db2look with the -e command will get the CREATE statements

   db2move automates exporting all the tables with one command

  I assume these are command line inputs.  Are they standard db2 commands?  We also got some advice on a third party solution, but our customer is strictly IBM and probably would not be interested.
0
 
LVL 45

Assisted Solution

by:Kdo
Kdo earned 200 total points
ID: 12311223

As long as you're signed on as the db2 instance owner, these commands should be available to you.

They should have been set into your PATH variable from your login script.


Kent
0
 
LVL 13

Accepted Solution

by:
ghp7000 earned 300 total points
ID: 12315787
yes, they are command line inputs and they will satisfy your requirements, however, if you are not familiar with db2look. it can be a hassle to find the correct switches, far easier to use control center
0
 

Author Comment

by:BrianGodfrey
ID: 12315857
Thanks for your help ghp7000 and Kdo.  I'm really accepting the whole of the discussion rather than one particular answer.  
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Exclude numbers that start with 7 4 237
Problem to insert 6 370
InterSystems Caché OPEN QUERY 4 449
How to use a CTE in a DB2 user defined function 6 107
Recursive SQL in UDB/LUW (you can use 'recursive' and 'SQL' in the same sentence) A growing number of database queries lend themselves to recursive solutions.  It's not always easy to spot when recursion is called for, especially for people una…
Recursive SQL in UDB/LUW (it really isn't that hard to do) Recursive SQL is most often used to convert columns to rows or rows to columns.  A previous article described the process of converting rows to columns.  This article will build off of th…
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

867 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now