1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2000
    Rep Power
    hai all,

    I am using four tier technology. HTMl-Servlet-Rmi Server - Database. when a user keys in a particular range of code in a html page, these values are passed to a servlet which in turn passes it to the rmi server which retreives data from the database, now the problem is I have to use two oracle databases which are in different locations, i want field1, field 2 from the first database , field 3, field 4 from the second database . i want all these details retreived and have to be shown in a single html table.

    both databases have a commong field engmodel. The values are being retreived from both the databases but these values are not associative, i.e record1 in database 1 should associate to the related record in database 2, but it is not. so can anyone tell me what i should do?

    Any sample code would be helpful
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2000
    Rep Power
    You'll be needing to look at the Oracle docs regarding queries across multiple DB's. I'm not sure of exact syntaxes etc., but it'll follow some kind of pattern like:

    SELECT first.field1, second.field2
    FROM db1.table first, db2.table second;

    You'll probably need to have TNS information available for both databases, and you will have to spend some time investigating how to connect across DBs as I don't know offhand exactly how these queries are formulated. You may have to create a connection first and then use it in a query, or you may have to wrap everything up in some PL/SQL (though I'd be surprised if there wasn't a simpler mechanism).

    Basically, this is a question that can only really be answered by the Oracle docs (or someone who has the time and expertise to sit down and discuss it with you -- the docs will most likely be quicker and less painful for all involved). Check out the Oracle Technology Network (http://otn.oracle.com) for all the information you could ever want about Oracle DB's. There are also some newsgroups out there you may like to ask on.

IMN logo majestic logo threadwatch logo seochat tools logo