Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: select data from different database

Re: select data from different database

From: sybrandb <sybrandb_at_gmail.com>
Date: 24 Nov 2006 02:01:28 -0800
Message-ID: <1164362487.907236.90610@j44g2000cwa.googlegroups.com>

On Nov 24, 10:24 am, "skyloon" <skyl..._at_gmail.com> wrote:
> hi,
> may I know how to select data from different database?
>
> for example,
> I've 2 databases, OracleDB and OracleAR
> Connect with OracleAR in SQL*Plus
>
> select * from OracleDB.TableName
>
> does Oracle support this kind of query?
>
> how can I retrieve data from other database while im connecting with
> other database?

Oracle calls this distributed database. This is a separate manual in the documentation.
To allow such a query, you must set up a database link to the remote database.
This is done using the CREATE [PUBLIC] database link command create database link foo connect to <username>/<password> using '<tns service name for the remote db>'. username/password is for a remote user. If you leave this out while creating the link Oracle will connect using the current user and password.
Further info in the docs.

-- 
Sybrand Bakker
Senior Oracle DBA
Received on Fri Nov 24 2006 - 04:01:28 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US