On an Oracle 12c database, login as sys as sysdba.
Create two users:
create user James identified by James;Now grant Ben the ability to connect through to James:
create user Ben identified by Ben;
grant create session to James;
grant create session to Ben;
alter user James grant connect through Ben;Now you are able to connect as Ben without knowing his password.
connect Ben[James]/Ben
show userSo you can see that even though we are logging in as Ben, using the [] brackets we are actually logging in as James;
USER is "JAMES"