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 a query on a remote database without database link

user13117585May 19 2017 — edited May 22 2017

Hello everybody,

I have a quick question. I need to execute a query on different databases and I have to build the connection string dynamically. unfortunately, this doesn't work

{code}

SELECT * FROM dual@('(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=server)(PORT=1291))(CONNECT_DATA=(SID=MYDB)))');

{code}

Any idea on how I can do this? I'm using Oracle 11.2.

Thank you,

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 19 2017
Added on May 19 2017
20 comments
19,476 views