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: copying data from one computer to another, without export

Re: copying data from one computer to another, without export

From: Brian Peasland <oracle_dba_at_qwest.net>
Date: Tue, 28 Aug 2001 12:47:35 GMT
Message-ID: <3B8B92E7.98D30100@qwest.net>


Scott,

You are on the right track...

First, you need to create a database link from your local database to your remote database. This is done as follows:

   CREATE DATABASE LINK link_name CONNECT TO userid IDENTIFIED BY password USING 'tns_entry';

You choose the link_name which is meaningful to you. The userid/password is the u/p to connect to the remote database. The tns_entry is an entry in your TNSNAMES.ORA file which points to the remote database. Refer to the Net8 Assistant for help setting that up.

After you've got the link created, you can use it to insert into a local table as follows:

   INSERT INTO local_table SELECT * FROM remote_table_at_link_name;

That's all there is to it!

HTH,
Brian

Scott Mattes wrote:
>
> I am working on a project where sometimes it would be handy to have
> the DB local (like when my IP connection goes out, or theirs does). I
> have installed Oracle 8 Personal and created all the tables. This
> helps quite a bit with compiling. Now I want to populate some of the
> tables with data. I have the free TOAD and that will create insert
> statements, but I thought that it would be easier, at least less
> steps, to do something like
>
> insert into my_local_table values( select * from remote.schema.table
> );
>
> My first try didn't succeed and I need to get back to work right now,
> but I thought that I would ask and see if I was at least on the right
> track.
>
> Any example would be greatly appreciated.
Received on Tue Aug 28 2001 - 07:47:35 CDT

Original text of this message

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