1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2013
    Rep Power

    Question List exiting databases in Oracle server using SQL plus command

    I am using Oracle database server and I want to show existing databases on that server. Are there any SQL plus command to list all databases there in the server?
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Oct 2003
    Rep Power
    Are you sure you want to list databases? A database in Oracle is something completely different than e.g. in SQL Server or MySQL.

    In case you do mean database (which I doubt): no, there is no SQL command to list those.

    Each database is (more or less) a different Oracle installation.

    Those are listed in /etc/oratab in Linux systems. Under Windows those would show up in the system registry.

    However a database in SQL Server or MySQL is usually mapped to a user/schema in Oracle (a user is basically the same as a schema there).

    To see all schemas in the current database (to which you are connected in SQL*Plus) you can use the view ALL_USERS (or DBA_USERS).

    More details are available in the manual: http://docs.oracle.com/cd/E11882_01/server.112/e25513/statviews_2129.htm#i1593342
    I will not read nor answer questions where the SQL code is messy and not formatted properly using [code] tags.

    Tips on how to ask better questions:

IMN logo majestic logo threadwatch logo seochat tools logo