Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Find users

Status
Not open for further replies.

zircon06

Technical User
Jan 8, 2007
81
Can anyone tell me sql command to find users in the database

Thanks
 
Active users? Try querying username in v$session.

I want to be good, is that not enough?
 
Hi zircon06,

You want all possible users in the dB?

For this you'll need access to sys's tables/views:

select name from sys.user$;

To add in other columns/fields to your select, get them from:

desc sys.user$

Good luck
DrD
 
...Or, as an alternative:
Code:
desc all_users

Name                    Null?    Type
----------------------- -------- ------------
USERNAME                NOT NULL VARCHAR2(30)
USER_ID                 NOT NULL NUMBER
CREATED                 NOT NULL DATE

select * from all_users;

USERNAME      USER_ID CREATED
---------- ---------- ---------
SYS                 0 14-SEP-03
SYSTEM              5 14-SEP-03
OUTLN              11 14-SEP-03
DBSNMP             19 15-SEP-03
DHUNT              21 15-SEP-03
YADA              110 07-FEB-07
...
Let us know if this is what you wanted.

[santa]Mufasa
(aka Dave of Sandy, Utah, USA)
[I provide low-cost, remote Database Administration services: www.dasages.com]
 
As always thanks Mufasa for your advice
 
You are welcome.[smile]

[santa]Mufasa
(aka Dave of Sandy, Utah, USA)
[I provide low-cost, remote Database Administration services: www.dasages.com]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top