Tuesday, September 13, 2011

Proxy user in Oracle

Proxy user - A proxy user is a user who can assume the identity of other user/users.It is basically created for the application user to access the target user data without knowing its password.

Creating Proxy User:

SQL> create user proxy1 identified by proxy1;

User created.

SQL> alter user target grant connect through proxy1;

User altered.

SQL> select * from dba_proxies;

PROXY CLIENT AUT
------------------------------ ------------------------------ ---
AUTHORIZATION_CONSTRAINT ROLE PROXY_AUT
----------------------------------- ------------------------------ ---------
proxy1 target NO
PROXY MAY ACTIVATE ALL CLIENT ROLES DATABASE

Connecting with Proxy User:

C:\WINDOWS\system32>sqlplus sys@TESTDB AS SYSDBA

SQL*Plus: Release 10.2.0.4.0 - Production on Thu Aug 25 11:33:45 2011

Copyright (c) 1982, 2007, Oracle. All Rights Reserved.

Enter password:

Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> conn proxy1[target]
Enter password:
Connected.
SQL> SHOW USER
USER is "target"


Hope it helps...

Happy Oracle learning.

Best regards,

Rafi.

No comments:

Post a Comment