Re: list users/databases

From: Sanjay D. S. <sanjay_at_fsg.prusec.com>
Date: 1996/07/01
Message-ID: <31D849B5.41C6_at_fsg.prusec.com>#1/1


Philip Davies wrote:
>
> The question is:
> Is it possible to get a list of users that are logged onto Oracle -
> I can list this on UNIX (ps -ef | grep ora) but I can't find a way within
> Oracle. I would also like to be able to get a list of all available
> databases. Apart from querying the oratab file and hoping it is up to
> date is there any way to detect this?
> My first reaction is no to both, set it up yourself - but here's hoping
> that Oracle can do these!
> Any help would be gratefully received,
> Thanks in advance,
>
> Lisa Jarman, DBA, PECC Ltd

To get list of all users currently logged onto given Oracle instance:

sqlplus (user_Id/password of dba privileged user) SQL> select osuser,username,program,status,process from

     sys.v$session;

SQL> select * from v$database;
(Current database name)

As two databases could be running independently of each other on the same machine, It would be difficult to get listing of all databases while connected to one, unless you were using GLOBAL NAMES.

Sanjay D. S.
Oracle Consultant Received on Mon Jul 01 1996 - 00:00:00 CEST

Original text of this message