Results 1 to 2 of 2
  1. #1
    Join Date
    Mar 2007
    Posts
    72

    Unanswered: What are the best options to Copy data FROM/TO different databaseses and SCHEMAs?

    Hi all,
    I have a need to copy data from one database/schema to a different database schema. Yes, I can use export/import but that is not "elegant". Yes, I can try a redirected Restore from Backup but this method has the irritating requirement of pause, set tablespaces and continue, again much manual intervention. What I am most interested in is this: The two databases are in the same instance/server. I want to be able to copy directly from database table to database table. For example, copy SCHEMA.TABLE1 to SCHEMAB.TABLE1. What are the options I can employ to do this outside of export and redirected restore?

    Does anyone have a easy to clone script to do this? I certainly will appreciate any help or pointers that I can get.

    Thanks for sharing any expirence you may have.

  2. #2
    Join Date
    Jan 2007
    Location
    Jena, Germany
    Posts
    2,721
    You could use DB2 Replication to take care of the copying process for you constantly.

    Alternatively, you can use DB2 Federation and represent a base table (or view) in database A as a nickname in database B and then just shuffle the data between the base table and nickname. After all, a nickname is just a table, so regular DML statements can be used.

    Yet another idea would be to load from pipes.
    Knut Stolze
    IBM DB2 Analytics Accelerator
    IBM Germany Research & Development

Posting Permissions

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