Results 1 to 3 of 3
  1. #1
    Join Date
    Apr 2009
    Location
    Worcester, UK
    Posts
    1

    Unhappy Unanswered: 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).


  2. #2
    Join Date
    Apr 2006
    Location
    Belgium
    Posts
    2,514
    Provided Answers: 11
    have a look in syntax for load of import and modified by
    generatedoverride can be specified
    LOAD
    Best Regards, Guy Przytula
    Database Software Consultant
    Good DBAs are not formed in a week or a month. They are created little by little, day by day. Protracted and patient effort is needed to develop good DBAs.
    Spoon feeding : To treat (another) in a way that discourages independent thought or action, as by overindulgence.
    DB2 UDB LUW Certified V7-V8-V9-V9.7-V10.1-V10.5 DB Admin - Advanced DBA -Dprop..
    Information Server Datastage Certified
    http://www.infocura.be

  3. #3
    Join Date
    May 2007
    Location
    somewhere in dbforums
    Posts
    221
    lookup information center for db2move command...
    IBM Certified Database Associate, DB2 9 for LUW

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •