wood burning stoves 2.0*
The moose likes JDBC and the fly likes Connection between two databases Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Connection between two databases" Watch "Connection between two databases" New topic
Author

Connection between two databases

njava nDeveloper
Greenhorn

Joined: May 26, 2010
Posts: 1
Hi, I am using two databases.My database is DB2 So in my java code I make a connection1 for SAMPLE1. Now connection is made specifying the Database name..so its db1 in this case.

Now for second database SAMPLE2 i am using another connection2. After making successful connections I want to pass data between two database. So I want to fetch data from DB sample1 with "select * from emp" and insert this into another DB sample2's emp table with insert query. I am doing this in java.

If it had been same database we could have used "Insert into emp select * from emp" but as these are two different DBs and two different connections its difficult to communicate.

Does anyone know if there we can use some common driver/connection object between two different DBs ? Or is there any other way to manipulate between two databases using a common or combined connection object ?

Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41123
    
  45
Maybe something like this: http://sourceforge.net/projects/dbtamer/ ?

Generally, the search term you're looking for is "JDBC ETL tool" (for Extract, Transform, Load).


Ping & DNS - my free Android networking tools app
David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

hmm, where have i heard of that before...
I need to get back to that soon. So much uncommitted code!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Connection between two databases
 
Similar Threads
How to close Hibernate C3P0 Connections properly?
volatile and static keywords
Single type import error.
XA vs non-XA
Connection Pooling-Urgent