Switching to a different Schema ( connect to another users schema without the schema prefix, run a query as another user)

Say you are logged in as SYS or SYSTEM and want to run a query as another user but don’t have that password.
Here is one way to switch or see that schema’s objects without prefixing schema name.
ALTER SESSION SET CURRENT_SCHEMA = <schema name>;
i.e.
alter session set current_schema=scott;
select * from emp;
 

Leave a Comment

Scroll to Top