User Tools

Site Tools


database:oracle:users:connect-as-another-user

This is an old revision of the document!


Connect as another user (using a privileged one)

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

If you want to change only the default schema:

ALTER SESSION SET current_schema=other_schema_name
database/oracle/users/connect-as-another-user.1537360008.txt.gz · Last modified: 2018/09/19 15:26 by odefta