File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Connection between two databases

 
njava nDeveloper
Greenhorn
Posts: 1
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Rancher
Pie
Posts: 42966
73
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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).
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hmm, where have i heard of that before...
I need to get back to that soon. So much uncommitted code!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic