For retrieving the schema names from the oracle database, we need to use dba_objects table.
select * from dba_objects
The above query will retrieve all the objects from the table. Below are some of the high level information.
Owner: Schema name
Object Name: Name of the object
Object_ID : Unique ID generated by the oracle database.
Object_type : Type of the object whether its a table/index/view or synonym
Created : creation time
Valid : Whether this object is valid or not?

Below is the query used to fetch all the schemas located in the oracle database.
select owner,count(owner) cnt from dba_objects group by owner
It includes all the system related schemas. This can be removed by using not in operator. Schema names like Oracle, Common, system, xdb etc.., were related to Oracle system related schemas.
Thanks and Regards,
Venkatesan Prabu .J
Happy Learning!!!




