Thursday, November 09, 2006

PL/SQL: DB Links

DB1: ED01 --This has the table oe_order_stg
DB2: CRD01--Need to access that table in ED01 from this DB.

1. Create a DB link(O11i_TO_CAT.ISUS.MC.COM) ..CRD01 -> ED01
2. Create a Synonym for the ED01 table(oe_order_stg) in CRD01:

CREATE OR REPLACE SYNONYM oe_order_stg
FOR oe_order_stg@O11i_TO_CAT.ISUS.MC.COM
/

3. Now in CRD01. you can access oe_order_stg directly.

Select * from oe_order_stg.

------------------

without synonym:

Select * from oe_order_stg@O11i_TO_CAT.ISUS.MC.COM (In CRD01).

0 Comments:

Post a Comment

<< Home