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: DB Links

Re: DB Links

From: Fred Stojentin <stojentin_at_orgdv.din.de>
Date: Tue, 22 Jun 1999 12:52:10 GMT
Message-ID: <376f83bb.2953152@news.cis.dfn.de>


On Mon, 21 Jun 1999 17:41:42 -0400, "Richard C. Lee" <rcl4_at_mindspring.com> wrote:

>What is the correct syntax for querying a table using a DB link?
>Is it [TableName]@[LinkName]? I've tried this and it hasn't worked.
>
>example: Link name is 'experiment'.
>query: select *
> from contract_at_experiment.prod2
>
>Thanks.
>
> RCL
>

Hi,
i think your problem is not the right syntax, but the missing database link. You need to *create* it first.

  create [public] database link $LINKNAME   connect to $USER identified by $PWD using '$CONNECT';

$CONNECT is the connect-string used to access the remote database from the machine where the local database resides (not your client). You can prove it via sqlplus from this machine: if   sqlplus $USER/$PWD@$CONNECT
is succsessful, then the database link will be useable.

After creating this link the
  select * from dual@$LINKNAME
should work.
___
Fred Stojentin Received on Tue Jun 22 1999 - 07:52:10 CDT

Original text of this message

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