Add-on comment/doubt
J. Laurindo Chiappa, August 04, 2017 - 1:02 pm UTC
Great answer, Connor : I don´t knew any of the options for #2 option, learned something new today, thanks...
An add-on : as you know, using proxy user, a (corretly permissioned) user A can connect 'in behalf of' another user B, even if A don´t know B´s password...
In this case where proxy-user priv is in use, could be sent B´s username/password to the database link created by A user via #2 answer, ie, not specifying username/password ??
Regards,
J. Laurindo Chiappa
August 05, 2017 - 3:15 am UTC
SQL> conn demo/demo
Connected.
SQL> create database link remote_db using 'db122';
Database link created.
SQL> conn / as sysdba
Connected.
SQL> alter user demo grant connect through scott;
User altered.
SQL> conn scott[demo]/tiger
Connected.
SQL> select * from tab@remote_db;
select * from tab@remote_db
*
ERROR at line 1:
ORA-25430: connected user database links are not supported in proxy session
Can you please share an example for #2
A reader, August 04, 2017 - 1:34 pm UTC
Can you please share an example for #2( consistent username/passwords across databases where appropriate )?
August 05, 2017 - 3:03 am UTC
SQL> conn scott/tiger
Connected.
SQL> create database link remote_db using 'db122';
Database link created.
SQL> select * from tab@db122;
TNAME
---------------------------------------------------------------
TABTYPE CLUSTERID
------- ----------
APP_BRANCH
TABLE
APP_BRANCH1
TABLE
Notice I didnt nominate a user/pass. So as long as the password for SCOTT is TIGER in the remote database (as it is in my local database) I can query remotely.