01-16-08, 17:41 #1Registered User
- Join Date
- Mar 2007
Unanswered: What are the best options to Copy data FROM/TO different databaseses and SCHEMAs?
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.
01-16-08, 17:44 #2Registered User
- Join Date
- Jan 2007
- Jena, Germany
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