Proxy Access

Introduction

Sometimes in a support role there may be a need for a database support user to be able to connect to another database user whose password is unknown to them.

One way of achieving this is by granting "proxy" access as shown in the example below.

WARNING - There are obvious security implications in using the grant connect through functionality. Use it at your own risk.


Example

SQL> connect sys as sysdba
Enter password:
Connected.

SQL> create user MySupportUser identified by MySupportUserPassword;

User created.

SQL> grant create session to MySupportUser;

Grant succeeded.

SQL> create user MyAppUser identified by MyAppUserPassword;

User created.

SQL> grant create session to MyAppUser;

Grant succeeded.

SQL> alter user MyAppUser grant connect through MySupportUser;

User altered.

SQL> connect MySupportUser[MyAppUser]/MySupportUserPassword
Connected.

SQL> select user from dual;

USER
------------------------------
MYAPPUSER

SQL> connect sys as sysdba
Enter password:
Connected.

SQL> select proxy,client from dba_proxies;

PROXY                          CLIENT
------------------------------ ------------------------------
MYSUPPORTUSER                  MYAPPUSER

SQL> drop user MySupportUser cascade;

User dropped.

SQL> drop user MyAppUser cascade;

User dropped.
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License