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: Oracle DATABASE LINK

Re: Oracle DATABASE LINK

From: Tommy <tcusan_at_yahoo.com>
Date: 1998/11/16
Message-ID: <3650A2AB.7DF02359@yahoo.com>#1/1

Hope this can be usefull.

Syntax:


CREATE {PUBLIC} DATABASE LINK <database link name>   {CONNECT TO <oracle user id> IDENTIFIED BY <remote oracle user's password>}

  USING '<dbstring>'

Notes:


  1. The Database Link will be created as Private by default.
  2. Use the CONNECT TO option if you want to access the remote database with a different Oracle USERID (i.e., not the one currently logged in).
  3. The <database link name> must correspond to the name of the database to which the database link refers.
  4. The <dbstring> is a valid SQL*Net connect string.

Examples:


   $ sqlplus system/manager

   SQL> CREATE PUBLIC DATABASE LINK sales.acme.com
     2> USING 'prodv2';
   SQL> select * from emp_at_sales.acme.com;

   $ sqlplus system/manager

   SQL> CREATE PUBLIC DATABASE LINK sales
     2> USING 't:dbserver:prod';
   SQL> select * from emp_at_sales;


Notes:


  1. The <database link name> - when the partial database name is used ("sales" vs. "sales.acme.com"), ORACLE automatically expands the database link name by appending the network domain of the local database to the specified database name to form a global database name.
  2. The <dbstring> - prodV2 is the SQL*Net V2 connect string, and t:dbserver:prod is the SQL*Net V1 connect string.

mateev_at_geocities.com wrote:

> I made database link between two ORACLE Instances with this
> SQL statement:

>

> create database link SEC_DB_LINK
> connect to MYNAME
> identified by MYPWD
> using 'SEC_DB';
>

> I received error message ORA-02085 when I use this database link, because
> SEC_DB_LINK is
> not equal to SEC_DB.
>

> However I see this SQL statement create properly worked
> database link on another ORACLE server.
>

> Can anyone help me?
>

> Georgy Mateev
> mateev_at_geocities.com
>

> -----------== Posted via Deja News, The Discussion Network ==----------
> http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
--

Regards,

Tommy Cusan
MIS - DBA Tech. Support

Oracle Indonesia
Sentral Senayan I Office Tower, 9th Floor
Jl. Asia Afrika no.8 - Jakarta 10270
Phone : (62 21) 572 3222
Fax   : (62 21) 572 3350 / 60
Received on Mon Nov 16 1998 - 00:00:00 CST

Original text of this message

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