Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is there an equivalent to MySQL SHOW DATABASES statement?

Is it possible to find databases in a cluster? i.e. databases present on the network on some other system?

Could I analyze the files present on an Oracle installation to find the same?

Given complete access credentials to an Oracle system how would you go about enumerating all the databases that exist?

share|improve this question
Note also there is a terminology mismatch between MySQL and Oracle Database. In terms of architecture, Oracle has table->schema->database, and at the same time also table->tablespace->database. MySQL has simply table->database. So maybe you are really searching for Oracle schema list (think: SQL namespaces for tables) or Oracle tablespace list (think: groups of OS files for tables). – kubanczyk Oct 29 '12 at 8:45
up vote 18 down vote accepted

Is there an equivalent to MySQL SHOW DATABASES statement?

There is no such thing. You can query listeners on a machine (lsnrctl status) to see what services are registered there, but that doesn't map one-to-one to database (and there could be multiple listeners on the same machine). Otherwise, the tools commonly used connect to one database instance, and an instance belongs to a single database.

If you're talking about Oracle RAC clusters, then each instance knows of its peers (other instances that service the same database) and you can find the other instances currently started for that database using the gv$instance view.
You can also use the crsctl utility to list the services (including databases) that are registered in the cluster, and their status.
If you're talking about another vendor's clustering software, I'm pretty sure they all have these types of resource management utilities to query.

If you're talking about just a bunch of machines, then no, there's no 100% reliable way of enumerating all databases on a network.

To find active (i.e. started) databases, look for *_pmon_* processes on Unix (there's one per database instance), and Oracle services on Windows.

To locate installations of Oracle database software, look at /etc/oratab on Unix. This should contain all the ORACLE_HOMEs installed. You can look inside each of those in $ORACLE_HOME/dbs for spfile<SID>.ora and/or init<SID>.ora files - there will be one for each database.

(I believe you can find the equivalent of the information in oratab in the Windows registry keys below HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE, but I don't know its structure.)

Now, of course, if you've registered all your database with an OEM (Enterprise Manager) server when you installed them, you can find the complete list there - but I guess if you're asking that's not the case.

share|improve this answer

Simply speaking, there is no direct analogy for MySQL 'databases' or a 'cluster' on Oracle: the closest match is a 'schema' but that is still very different.

This is apparently going to change in 12c with the introduction of pluggable databases:

Dividing the database operations cleanly from the user's content is a major transformation from traditional database architectures. Oracle 11g, and all its predecessors, could only run one database at a time, Kyte said. If an organization wanted to run multiple databases on a single server, it would need to run multiple instances of Oracle 11g, one for each database. As the name implies, pluggable databases allow multiple tenant databases to run under one copy of Oracle 12c.

share|improve this answer
Uh great, more complication, more job security... – kubanczyk Nov 21 '12 at 15:03
I have a different oracle problem. Are you willing to comment on it? Here is the link:… – CodeMed Feb 26 at 1:29

Oracle has no databases but schemas, you can list them with


or something like this :

share|improve this answer
Tablespaces are not linked to schemas in general. – Mat Nov 7 '12 at 7:12
ALL_USERS? USER_TABLESPACES? – kubanczyk Nov 21 '12 at 14:55
"Is there an equivalent to MySQL SHOW DATABASES statement?" im trying to answers that question. dont say u dont know – DevYudh Nov 23 '12 at 4:14
@DevYudh: a tablespace in Oracle is something completely different than a "database" in MySQL. The first query if correct, the second query is plain wrong – a_horse_with_no_name Jun 22 '15 at 14:35

I think an answer for future browsers on *nix could be:

cat /etc/oratab

share|improve this answer

Just connect to ASM and check database client.

set pages 999 lines 120
col DB_NAME for A20 trunc
share|improve this answer
This assumes ASM is being used! What about databases stored on a filesystem or SAN? – Colin 't Hart Jun 22 '15 at 14:25

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.