Oracle SQL Query for listing all Schemas in a DB

vicsz picture vicsz · Jan 28, 2011 · Viewed 382.8k times · Source

I wanted to delete some unused schemas on our oracle DB.

How can I query for all schema names ?

Answer

a_horse_with_no_name picture a_horse_with_no_name · Jan 28, 2011

Using sqlplus

sqlplus / as sysdba

run:

SELECT * 
FROM dba_users

Should you only want the usernames do the following:

SELECT username 
FROM dba_users