Thursday, 16 March 2017

How to identify the oracle schema names in a database / Display all oracle Schemas

How to identify the oracle schema names in a database? / Display all oracle Schemas

 select distinct
   owner
from
   dba_segments
where
   owner in
   (select username
    from dba_users
    where default_tablespace not in ('SYSTEM','SYSAUX')
   )
;

or

select distinct
   owner
from
   dba_segments
where
   owner not in (
'SYSTEM', 'XDB', 'SYS', 'TSMSYS', 'MDSYS', 'EXFSYS', 'WMSYS', 'ORDSYS', 'OUTLN', 'DBSNMP');

Source : http://www.dba-oracle.com/t_display_all_schemas.htm

No comments:

Post a Comment