CREATE USER proxy1 IDENTIFIED BY proxy1; ALTER USER main_user GRANT CONNECT through proxy1; CONNECT proxy1[main_user]/proxy1@SID;
Now we are connected, let's check current user:
SHOW USER;
Output: user is main_user
ALTER SESSION SET current_schema=other_schema_name
Check if the schema was changed:
SELECT sys_context( 'userenv', 'current_schema' ) FROM dual;