Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Database names?

Re: Database names?

From: Joel Garry <joel-garry_at_home.com>
Date: 19 Feb 2003 16:43:48 -0800
Message-ID: <91884734.0302191643.2c16c2af@posting.google.com>


"James" <james_at_nothing.com> wrote in message news:<1045650195.584305_at_ftp.adept.co.za>...
> Hi there
> Can someone tell me how I can get the names of all the Databases on a
> server? I understand that the that the database structure of a n oracle
> server is very different to a SQL server.
>
> I wand to be able to determin all the names of all the database on the
> server that I'm working with.
> I'm using oracle 9i server and have full rights to the server!
>
> Hope someone can help.
> Thanks in Advance
> cheers
> James

As you've seen from the other replies, this is not a simple question.

First of all, as someone posted, in some circles what is called a database is what Oracle calls a schema. I've even seen some more extreme cases where there are multiple schemata comprising a "database."

The oratab file (remember to post exact version numbers and platforms if you want good advice!) which on some machines is in /etc and some /var/opt and some elsewhere may or may not have all the db's listed, depending on how well the machine has been administered in the past.

Also confusing, looking at processes only shows running instances, and it is entirely possible to have down databases that don't show up.

Look in cron or batch control files to see what is being backed up. Look in $ORACLE_HOME/admin/*/bdump/* for alert*log and maybe some traced control files.

If the instance(s) is(are) installed according to OFA (the non-Optimal, inFlexible, incomplete-Architecture), you may be able to "ls /*/oradata |sort -u" or "find . -name oradata" or "ls -l $ORACLE_HOME/admin" or "ls $ORACLE_HOME/dbs and pick out some instance names.

If everything is running that could be, you can sometimes get a clue from "lsnrctl status". Or try finding all the tnsnames.ora files, if they are being used.

Of course, having full rights and no knowledge is a very dangerous thing.

jg

--
@home is bogus.
Find the FAQ!
Received on Wed Feb 19 2003 - 18:43:48 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US