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 > What are the best options to Copy data FROM/TO different databaseses and SCHEMAs?

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-16-08, 16:41
pagwu pagwu is offline
Registered User
 
Join Date: Mar 2007
Posts: 70
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.
Reply With Quote
  #2 (permalink)  
Old 01-16-08, 16:44
stolze stolze is offline
Registered User
 
Join Date: Jan 2007
Location: Jena, Germany
Posts: 2,662
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
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