Re: Referring to a table in another database

From: <jl34778_at_corp02.d51.lilly.com>
Date: 5 Mar 94 15:52:06 EST
Message-ID: <1994Mar5.155206.1_at_corp02.d51.lilly.com>


In article <CM5Gnv.JL_at_uceng.uc.edu>, pbalakri_at_uceng.uc.edu (Purushothaman Balakrishnan) writes:
> Pardon me for this silly question.
>
> I have two instances of two different databases running on one
> server. I have a parent table in one database and a child table in another
> database. I want to create triggers for maintaining referential integrity
> between these two tables.
>
> Every time I try to create a database link and then a synonym for the
> table in the link, it assumes the database to be a remote database.
>
> How can I refer to the table in the other database?
>
> Thanks in advance for any suggestions/help.

As I understand it, any database accessed through a db link is considered to be 'remote', even if it is on the same machine. ORACLE will retrieve the data using SQL*net.

Your note doesn't say if you are having a problem, or if you are just confused. It sounds to me that you are doing it right.

Instance A

        CREATE TABLE FRED (TESTFIELD VARCHAR2(10); Instance B

	CREATE DATABASE LINK A
		CONNECT TO userid IDENTIFIED BY password
		USING 'T:ip_address:A';
	CREATE SYNONYM FRED FOR FRED_at_A;

-- 
Bob Swisshelm                | swisshelm_at_Lilly.com     | 317 276 5472
Eli Lilly and Company        | Lilly Corporate Center  | Indianapolis, IN 46285
Received on Sat Mar 05 1994 - 21:52:06 CET

Original text of this message