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 ?