Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: sql command to list all databases in the oracle server
DA Morgan wrote:
> dalu.gelu_at_gmail.com wrote:
> > Hi,
> >
> > could u help me, what is the sql command to list all existing databases
> > in a oracle server?
>
> Oracle IS NOT SQL Server
> Oracle IS NOT Sybase
> Oracle IS NOT Informix
> Oracle IS NOT Ingres
>
> Thus your question has no meaning.
>
> In Oracle a "database" is a set of related physical files sitting on
> disk. It has nothing to do with the use of that word in other products.
>
> The word you are looking for is SCHEMA and the query you are asking for is:
>
> SELECT username, account_status
> FROM dba_users
> ORDER BY 1;
>
Wouldn't this show more then the "schema-owners". I looked it up in the (oracle 10) documentation : "A schema is a collection of database objects. A schema is owned by a database user and has the same name as that user."
I think the above query will show all users in the database. Probably a lot of them are not schema-owners.
So ... if you are looking for schema's (ofcourse identified by username) you better could use the following query? select distinct username from dba_objects;
anyway ...... everybody have a wonderfull 2007
Best regards,
Martijn Bos
> For more information try the following:
> http://tahiti.oracle.com
> http://www.psoug.org (and click on Morgan's Library)
>
> HTH
> --
> Daniel A. Morgan
> University of Washington
> damorgan_at_x.washington.edu
> (replace x with u to respond)
> Puget Sound Oracle Users Group
> www.psoug.org
Received on Sat Dec 30 2006 - 05:04:31 CST