Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

MERGE a remote table from another remote table

IJNov 5 2014 — edited Nov 5 2014

Hi,

I have a source DB and a target DB. I don't have enough privileges on source and target DBs to create DB Link. Hence I've installed an Oracle XE instance between them to create proper DB Links to both source and target DBs and run a MERGE statement to replicate data from source to target. But when I run the below MERGE statement I get errors:

MERGE INTO TAB_A@TARGER T

USING (SELECT .... FROM TAB_B@SOURCE) S

ON (S.ID = T.ID)

WHEN MATCHED THEN

UPDATE SET ...

WHEN NOT MATCHED THEN

INSERT VALUES (...);

Error report -

SQL Error: ORA-02019: connection description for remote database not found

ORA-02063: preceding line from XE

ORA-02063: preceding 2 lines from TARGET

02019. 00000 - "connection description for remote database not found"

*Cause:

*Action:

arch.png

I wonder whether this statement is possible or not?

Iman

P.S. I don't get error if I create a copy of TAB_A (target) in OracleXE as a staging table and run 2 separate MERGE statements . What I want to do is eliminating the staging table.

This post has been answered by Saziba on Nov 5 2014
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 3 2014
Added on Nov 5 2014
7 comments
682 views