Results 1 to 3 of 3
  1. #1
    Join Date
    Feb 2007

    Unanswered: Copy list of tables from one db to another db

    I'm using DB2 v9.1 Fix Pak 4 with AIX 6.1. I'm still pretty new to DB2, so please be patient with me, I'm learning....

    I would like to copy a handful of tables from one of our Production databases to our Test environment and called the database "TEST". I was wondering the best approach of doing this.

    I've already Exported the tables using this command "db2move <database> export -tf /path/tmp/listofschematables;" and ready to Load by this "db2move <database> LOAD -lo INSERT -l /path/tmp/".

    The TEST database was created in the test environment with a different name than the Production database. Also I copied one of the ddls tables from one Production table and changed the database name in test and ran.

    I tried to run the ddl and got these errors "ALTER TABLE "PRODDTA "."F0006" PCTFREE 10 DB21034E The command was processed as an SQL statement because it was not a valid Command Line Processor command. During SQL processing it returned: SQL0204N "PRODDTA.F0006" is an undefined name."

    Should I run the ddl for all of the Production database and edit it for TEST? What is the best approach to this or what am I missing? The goal is to only copy 7 tables from Production env. to the Test env (but Test has a different DB name). That is it.

    Please help?

    Thank you.


  2. #2
    Join Date
    Jun 2003
    Toronto, Canada
    Provided Answers: 1
    Consider using the copy ("-co") option of db2move - it will allow you to create listed tables and load data, while changing the target schema name(s).

  3. #3
    Join Date
    Feb 2007
    Thank you for the tip.

Posting Permissions

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