Pages

Saturday, April 06, 2013

Oracle Proxy User

A proxy user is a user that is allowed to "connect on behalf of another user"



Proxy User:

SQL> CREATE USER proxy_user IDENTIFIED BY pw_proxy
  2  DEFAULT TABLESPACE users
  3  TEMPORARY TABLESPACE temp;

User created.

Target User:
SQL> CREATE USER target_user IDENTIFIED BY pw_target
  2  DEFAULT TABLESPACE users
  3  TEMPORARY TABLESPACE temp QUOTA UNLIMITED ON users;

User created.

The target user is altered
SQL> ALTER USER target_user GRANT CONNECT THROUGH proxy_user;

User altered.

SQL> grant create session to target_user;

Grant succeeded.

SQL> conn proxy_user[target_user]/pw_proxy
Connected.
SQL> show user
USER is "TARGET_USER"
SQL>








2 comments:

  1. Inam,

    You forget to mention that this feature available with 11.2.0.3 onwards.

    ReplyDelete