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 > How to copy a database from Windows to Linux

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 04-15-09, 05:34
JohnnyO JohnnyO is offline
Registered User
 
Join Date: Apr 2009
Location: Worcester, UK
Posts: 1
Unhappy How to copy a database from Windows to Linux

Hi all.

I have a populated DB2 Express-C database on Windows XP and I want to copy it to Ubuntu 8.04. I see that this can't be done by BACKUP and RESTORE (and indeed I spent ages trying before I came upon that fact) but I do need to do it somehow.

I have successfully installed DB2 Exp-C on Ubuntu.

I see I can use DB2LOOK (! - never tried it) to get the database definitions across and also that I can use CSV files to transfer the data (which I have done before elsewhere) but my problem is this: the database contains tables that generate an ID field for each row. That ID field is the primary key for those tables and is used as a foreign key widely. How can I set up the new database to also generate the ID fields in its post-data-migration life but allow me to copy across rows with existing IDs unchanged? My experience of importing CSV files is that if you have a generated private key you just can't insert rows with given values...unless I'm missing something (which I may well be as I only occasionally do db admin).

Reply With Quote
  #2 (permalink)  
Old 04-15-09, 05:38
przytula_guy przytula_guy is offline
Registered User
 
Join Date: Apr 2006
Location: Belgium
Posts: 1,159
have a look in syntax for load of import and modified by
generatedoverride can be specified
LOAD
__________________
Best Regards, Guy Przytula
Database Software Consultant
DB2 UDB LUW Certified V7-V8-V9-V9.7 DB Admin - Dprop..
Information Server Datastage Certified
http://www.infocura.be
Reply With Quote
  #3 (permalink)  
Old 04-15-09, 08:50
nick.ncs nick.ncs is offline
Registered User
 
Join Date: May 2007
Location: somewhere in dbforums
Posts: 221
lookup information center for db2move command...
__________________
IBM Certified Database Associate, DB2 9 for LUW
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