Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: ******pl/sql*******
To do this, you need the (extra $) Oracle product "Transparent Gateway for DB2" (TG4DB2) [http://technet.oracle.com/doc/gateways/tg4db2/toc.htm] which allows DB2 for OS/390 databases to be accessed as though they were Oracle tables. After installing the TG4DB2 software, you would need to configure it for the specific DB2 subsystem (and tables?). You probably need DB2 Client Application Enabler that is available at http://www.software.ibm.com/data/db2/db2tech/clientpak.html.
On your Oracle8i on NT server, you would then need to create a tnsnames.ora
entry for the TG4DB2 server and a database link to the TG4DB2 server
CREATE DATABASE LINK <linkname>
CONNECT TO <tg4db2_user> IDENTIFIED BY <pwd>
USING 'connect_string';
Finally, you would do:
INSERT
INTO <localowner>.<localtable>
[(<columnlist>)]
(SELECT <columnlist>
FROM <tg4db2_owner>.<tg4db2_table>@<linkname> WHERE <predicatelist>)