The proxy user doesn't naturally appear in the V$ views (as far as I can tell), but can be derived from SYS_CONTEXT, and therefore used in a LOGON trigger to set CLIENT_INFO which is visible, or you could trace DDLs with AUDIT or a trigger and store the value there.
C:\>sqlplus gary/gary@xe
SQL*Plus: Release 10.2.0.1.0 - Production
SQL> create user schema1 identified by ***** default tablespace users;
User created.
SQL> alter user schema1 quota unlimited on users;
User altered.
SQL> create table schema1.test (id number);
Table created.
SQL> create user devuser identified by dangermouse default tablespace users;
User created.
SQL> alter user schema1 grant connect through devuser;
User altered.
SQL> grant create session to schema1;
Grant succeeded.
SQL> conn devuser[schema1]/dangermouse@xe
Connected.
SQL> select user from dual;
USER
------------------------------
SCHEMA1
SQL> select sys_context('userenv','proxy_user') from dual;
SYS_CONTEXT('USERENV','PROXY_USER')
--------------------------------------------------------------------------------
DEVUSER
With a JDBC client, such as SQuirrel, I simply put the username as DEVUSER[SCHEMA1] and use the DEVUSER password.
3 comments:
Typical developers recompile schema objects such as package. What kind of privileges they must have?
The devuser is only used for password authentication. When they connect as a proxy user to the schema account they will get all the privileges of that schema account.
Just think of it as a way to have multiple, individual passwords for the same account.
Sorry, my question has been caused by my overlooking the create procedure privilege lack on my development schema.
Post a Comment