Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Database Links
Abeeda_Mohammed_at_xn.xerox.com wrote:
>I have to retrieve data from a DB2 database through an Oracle Gateway. I've
>been given access to it. So if thru gateway I connect to the instance 'MNDB'
>, I am able to access data by issuing the following SQL stmt.
>Select po_no from dba1.xyz_at_dbp2;
>I've to get data from MNDB and put it another database 'SEAR'. So I created a
>database link to MNDB from SEAR .
>But 'dba1.xyz' is in MNDB through a database link. How do I reference
>'dba1.xyz' from SEAR through the MNDB database link?
It would be a lot more efficient to access the gateway directly from SEAR i.e. by creating an appropriate database link in SEAR.
If you must go through MNDB, create a synonym in MNDB for the
DB2 table, something like
CREATE SYNONYM db2_xyz FOR dba1.xyz_at_dbp2
and access the synonym from SEAR via a database link from SEAR
to MNDB. If the synonym is a private synonym as shown above,
the dblink session from SEAR to MNDB must have access to the
schema that owns the synonym and, of course, to the database
link dbp2.
/b
--
Bill Manry - IBM Products Division - Oracle Corporation
These are my opinions, not necessarily Oracle's.
Remove "." from "B.Manry" to email me.
Received on Tue May 05 1998 - 17:45:23 CDT