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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Script to select users in the database.

Status
Not open for further replies.

jayjaybigs

IS-IT--Management
Jan 12, 2005
191
CA
Hello All.

Does anyone has a script to select users in the database. That is, users with only read access in the database.
I am currently using this
select null grantee,username granted_role from dba_users But I am not getting the desired result.

Thanks
 
jayjay,

that's two for the price of one!

If you want user's presently connected, then
Code:
SELECT OSUSER FROM V$SESSION;
should do the trick.

If you want users, then dba_users is fine.
If you want roles then query for roles.

If you want to know about privileges, try user_privs.

There are so many possibilities here that I'm not quite sure what you're after. I hope this helps some.

Regards

Tharg

Grinding away at things Oracular
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top