Question: I want to know how can we know the other users of Oracle 10g on the same system?
Is there any query for that?

Thank you!!!

Answer: 
```
select username
from all_users
/

```

This view doesn't have [much information](http://download.oracle.com/docs/cd/B19306_01/server.102/b14237/statviews_2114.htm#i1593342 "Oracle 10g Reference"). If you need more you will need privileges on its [DBA\_USERS equivalent](http://download.oracle.com/docs/cd/B19306_01/server.102/b14237/statviews_4174.htm#i1628672). As its name suggests, that view requires a DBA level of access.
Along with the all\_users table provided by APC, you can also query dba\_users which contains more data.

```
SQL> select username, account_status, default_tablespace from dba_users;

SQL> desc dba_users;
     Name                      Null?    Type
     ----------------------------------------- -------- ----------------------------
     USERNAME                                  NOT NULL VARCHAR2(30)
     USER_ID                                   NOT NULL NUMBER
     PASSWORD                                           VARCHAR2(30)
     ACCOUNT_STATUS                            NOT NULL VARCHAR2(32)
     LOCK_DATE                                          DATE
     EXPIRY_DATE                                        DATE
     DEFAULT_TABLESPACE                        NOT NULL VARCHAR2(30)
     TEMPORARY_TABLESPACE                      NOT NULL VARCHAR2(30)
     CREATED                                   NOT NULL DATE
     PROFILE                                   NOT NULL VARCHAR2(30)
     INITIAL_RSRC_CONSUMER_GROUP                        VARCHAR2(30)
     EXTERNAL_NAME                                      VARCHAR2(4000)
     PASSWORD_VERSIONS                                  VARCHAR2(8)
     EDITIONS_ENABLED                                   VARCHAR2(1)

```

For finding information on only the currently connected users you can use a join of dba\_tables and v$session.

```
SQL> SELECT a.username, s.sid, s.program 
     FROM dba_users a JOIN v$session s ON (a.username = s.username) 
     ORDER BY a.username;

```