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: ******pl/sql*******

Re: ******pl/sql*******

From: Richard <roxl_at_ozemail.com.au>
Date: 2000/05/27
Message-ID: <CwGX4.2457$N4.79437@ozemail.com.au>#1/1

> Hi
>
> I have oracle 8.1.5 in NT4 server,
> from sqlplus on this box I can connect to oracle and to another
> db2 database(remote) which is on 0s/390,
> I have 2 common table both on oracle and db2 database.
>
> I need to write a pl/sql which will select data from db2 table and
> insert into oracle table.
>
> I am confused as when I am selecting data from db2 that is actually
> not in this box but in a terminal like,
>
> How can I capture that db2(remote) data and put into oracle(local)table.
>
> please give some advice
>
> rcy

You may also want to look into the SQL*Plus command COPY. It allows you to copy data between two instances (as defined by connect strings). Since you seem to be able to connect to DB2 using SQL*Plus then this may work.

COPY has one huge advantage over CREATE TABLE AS SELECT - it commits periodically as it goes and so can be used for tables of reasonable size. Saves you writing PL/SQL usually, and COPY can include SQL functions (eg date conversions) if necessary.

(Have used it heaps between Oracle instances - but never against DB2...)

/Richard/ Received on Sat May 27 2000 - 00:00:00 CDT

Original text of this message

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