Oracle 12c Show Which Containers All Users Are In And Which Container You Are Currently In

When connect to the root container CDB$ROOT:
select c.name container, u.username username
from v$containers c, cdb_users u
where c.con_id=u.con_id
order by c.name;
Just in case you are not certain which container you are currently connected to from sqlplus or sqldeveloper etc:
show con_name
CDB$ROOT

Leave a Comment

Scroll to Top