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!

Execute query in remote database without adding DB-Link to every table

3261255Sep 5 2018 — edited Sep 5 2018

I have complex queries(joins, unions, ...) and database where the query have to be executed. Databases are two. Problem is that I can't(I don't know how) add DB-Link to every table. All tables in one query are on same databese.

And now I search for something like:

insert into res_remote_table@dblink

select * from ( <complex_query_here> )@dblink

or another way to say where a query have to be executed without adding a dblink to every table.

I have queries,dblink, remote table name like varchar2. That means I hate to execute this with EXECUTE IMMEDIATE.

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 3 2018
Added on Sep 5 2018
10 comments
6,145 views