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 > "export" db2 database

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 10-26-04, 04:13
mihai mihai is offline
Registered User
 
Join Date: Sep 2004
Posts: 5
"export" db2 database

hi folks,

I created a db2 database in db2 personal edition and I want to "export" this database (tables, constraints and data from tables) to an another machine which has installed also db2.
It is that possible in db2?

I see that I can generate DDL for an existing database, but this is not enough for me because I need to get data from tables also.

10x in advance
m.
Reply With Quote
  #2 (permalink)  
Old 10-26-04, 05:30
Romeo Romeo is offline
Registered User
 
Join Date: Feb 2002
Location: Philippines
Posts: 41
if DB2 are installed on the same OS, use the backup tool

if different OS, use db2move command
__________________
There are 10 kinds of people,
those who know binary and those who don't.

http://www.linkedin.com/in/rtitong
Reply With Quote
  #3 (permalink)  
Old 10-26-04, 10:33
Tank Tank is offline
Registered User
 
Join Date: Feb 2004
Location: Copenhagen
Posts: 220
Do db2look first

typo cannot remove
__________________
Kristian K. Hansen
Project Supervisor
National Board of Health

Last edited by Tank; 10-26-04 at 10:38.
Reply With Quote
  #4 (permalink)  
Old 10-26-04, 10:34
Tank Tank is offline
Registered User
 
Join Date: Feb 2004
Location: Copenhagen
Posts: 220
Arrow Do db2look first

Romeo is right but to ensure system integrity if you
cannot move by the backup utility i propose:

1. Using the db2look command to move all system information

2. Then using db2move with the replace option to move all data

SY
__________________
Kristian K. Hansen
Project Supervisor
National Board of Health
Reply With Quote
  #5 (permalink)  
Old 10-27-04, 07:48
JAYANTA_DATTA JAYANTA_DATTA is offline
Registered User
 
Join Date: Oct 2004
Location: DELHI INDIA
Posts: 336
Jayanta, xansa INDIA

Db2look and Db2move utility would solve your problem like others saying:

Exact Command:

1>

db2look -d DATABASE1 -z Schema1 -a -e -l -x -c -i username -w password -o output.ddl

2>

db2move databasename EXPORT

it would export all the user created tables records in the current directory.

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