This discussion is archived
5 Replies Latest reply: Nov 26, 2012 5:33 AM by 975959 RSS

Join between two DB

975959 Newbie
Currently Being Moderated
Hi,
can I perform a query between two different DB?
I'm logged on DB-a and i'd like to have result from different table in DB-a and DB-b.
I don't have any synonym, or view from DB-a towards DB-b, and I can't create for some kind of policy.

Thanks a lot.
  • 1. Re: Join between two DB
    rp0428 Guru
    Currently Being Moderated
    Welcome to the forum!

    Whenever you post provide the 4 digit Oracle versions of the DBs involved.
    >
    can I perform a query between two different DB?
    I'm logged on DB-a and i'd like to have result from different table in DB-a and DB-b.
    I don't have any synonym, or view from DB-a towards DB-b, and I can't create for some kind of policy.
    >
    You need a database link between the two DBs and privileges on the tables/views that you want to access.
  • 2. Re: Join between two DB
    ranit B Expert
    Currently Being Moderated
    can I perform a query between two different DB?
    From Oracle Docs ... http://docs.oracle.com/cd/B28359_01/server.111/b28310/ds_concepts002.htm#i1007709
    >
    What Are Database Links?
    A database link is a pointer that defines a one-way communication path from an Oracle Database server to another database server.

    A database link connection is one-way in the sense that a client connected to local database A can use a link stored in database A to access information in remote database B, but users connected to database B cannot use the same link to access data in database A. If local users on database B want to access data on database A, then they must define a link that is stored in the data dictionary of database B.
    >

    Hope this Helps,
    Ranit B.
  • 3. Re: Join between two DB
    975959 Newbie
    Currently Being Moderated
    Hi thanks both for the answers.
    DB with I work in is Oracle 11g.

    I understand the answer, but unfortunately I can't create any new object.
    Could be possible to join both DB, with a "superuser" login ?

    Another question, how can I check if other link, or view already exist?

    Thanks,
    Stefano
  • 4. Re: Join between two DB
    rp0428 Guru
    Currently Being Moderated
    >
    I understand the answer, but unfortunately I can't create any new object.
    Could be possible to join both DB, with a "superuser" login ?
    >
    No - you will have to use an ETL tool that does the join externally. You could use Oracle Data Integrator, Informatica or DataStage.

    Or you could use Java to extract data from both DBs.
  • 5. Re: Join between two DB
    975959 Newbie
    Currently Being Moderated
    Thanks for your reply.

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points