|René Nyffenegger's collection of things on the web|
René Nyffenegger on Oracle - Most wanted - Feedback
- Follow @renenyffenegger
Proxy users [Oracle]
A proxy user ...
create user proxy_user identified by pw_proxy default tablespace users temporary tablespace temp;
... and a target user is created.
create user target_user identified by pw_target default tablespace users temporary tablespace temp quota unlimited on users;
The target user is altered (so to truly make him a target user through which a proxy user can connect).
alter user target_user grant connect through proxy_user;
grant create session, create table to target_user;
Note: only the target user has the
The target user creates a table, but does not grant select on it to the proxy user:
create table targets_table ( col varchar2(10) );
insert into targets_table values ('foo');
The proxy user can now connect with the proxy_user[target_user] syntax, hence becoming the target user.
Indeed, the table can be selected from:
select * from targets_table;
COL ---------- foo