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: Database Links

Re: Database Links

From: Bill Manry <B.Manry_at_upsizeme.us.oracle.com>
Date: 5 May 1998 22:45:23 GMT
Message-ID: <6io4q3$7s$1@inet16.us.oracle.com>


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

Original text of this message

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