tags:

views:

38

answers:

2

in mysql its show databases;

but how to show the available databases in oracle. can someone help

+1  A: 

Maybe you could use this view, but i'm not sure.

select * from v$database;

But I think It will only show you info about the current db.

Other option, if the db is running in linux... whould be something like this:

SQL>!grep SID $TNS_ADMIN/tnsnames.ora | grep -v PLSExtProc
Jonathan
+3  A: 

You can think of a mysql database as a schema/user in Oracle. If you have the privileges, you can query the DBA_USERS view to see the list of schemas.

dpbradley
Some oracle databases have a lot of users without objects. For these, and alternative is SELECT DISTINCT OWNER FROM ALL_OBJECTS;
Gary
+1 nice alternative, just be aware that if you are not a privileged user and issue this query, you will see only those OWNER's where you have a privilege on at least one of their objects.
dpbradley