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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Database link

Re: Database link

From: Beverly Hom <bhom_at_sprintmail.com>
Date: Thu, 04 Jun 1998 08:42:06 -0700
Message-ID: <3576C04D.F27FE674@sprintmail.com>


I need more information to answer this question:

  1. What version of sql*net do you have installed on the server you are accessing, and the server you are accessing from?

If you are running sql*net 2.x or higher on your machine, the server you are accessing
needs to also run sql*net 2.x or higher. You need to check to see if you have a
tnsnames.ora file. If you or your dba installed sql*net successfully and configured
it, the tnsnames.ora file usually defaults into the $ORACLE_HOME/network/admin
directory, unless your dba has moved it to a different location. If so, they should
have set up an environment variable $TNS_ADMIN. The server's information you
are attempting to access should have an entry in the tnsnames.ora file. Example
below:

abcdb.world =
  (DESCRIPTION =
    (ADDRESS_LIST =

        (ADDRESS =

(COMMUNITY = tcp.world)
(PROTOCOL = TCP)
(Host = Production1)
(Port = 1521)
)

    )
    (CONNECT_DATA = (SID = SID1)
    )
  )

Host = either the ip address of the remote server or the hostname of the remote server
SID = the database name for the remote server

When you create the database link, you will need to provide the alias for the node
you are accessing in the "using" statement:

create database link abc
 connect to scott identified by tiger
 using 'abcdb.world';

Then, you can select from scott's table on the other server:

select * from scott.emp_at_abc;

Hope this helps.

Vidar Mikkelsen wrote:

> I want to perform selection from tables in an other database.
> I've tried to create a database link , but it does not work, tns error.
> How can i set up sqlnet to reach a DB on antoher Unix machine ??
>
> Vidar



Received on Thu Jun 04 1998 - 10:42:06 CDT

Original text of this message

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