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: insert data from another database

Re: insert data from another database

From: <raqgf_at_my-deja.com>
Date: Mon, 05 Jul 1999 15:26:48 GMT
Message-ID: <7lqirc$lta$1@nnrp1.deja.com>

In article <7lfchk$4om$1_at_newsread.do.de.uu.net>,
  "Markus Pesti" <pesti_at_htwk-leipzig.de> wrote:

> I have to insert data into a table. These data
are to be selected from
> another database.:
>
> SQL> insert into mytable select * from
anothertable_at_anaotherdatabase;
>
> This produces the following error message:
>
> "ORA-02019: connection description for remote
database not found"
>
> My question is, where is the connection
description to be done?
>
> Thanks Markus
>
>

You should do the description in de database where is the table in wich
you want insert the data.
It can do it creating a database link:

    CREATE [PUBLIC] DATABASE LINK name_of_the_link     [CONNECT TO username IDENTIFIED BY password]     USING 'service_name' ;
Where:

    => Public: Available to all the users. Without this option, it's only
available to you.

    => name_of_the_link : If the server in which is "anotherdatabase" is
not in the same domain that the databas in which you want

               insert the data, it must include the domain of
anotherdatabase, (the domain is in de constant DB_DOMAIN)
    => username: user login, a user who can do a select to the
anothertable

    => password: password of that user
    =>service_name: specification of the anotherdatabase (see the
tnsnames.ora)

Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't. Received on Mon Jul 05 1999 - 10:26:48 CDT

Original text of this message

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