Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Find users with CREATE SESSION privilege.

user13009028Jul 9 2010 — edited Jul 12 2010
Hi,

Can anyone tell me a way to find all the users in the database who are granted CREATE SESSION privilege - either directly or through some roles ?

I figured the following query - but I believe it is still not a complete listing.

select b.username, b.password from dba_sys_privs a , dba_users b
where a.PRIVILEGE like 'CREATE SESSION'
and a.GRANTEE=b.username
union
select distinct b.username, b.password from dba_role_privs a, dba_users b
where a. GRANTED_ROLE in (select grantee from dba_sys_privs where PRIVILEGE like 'CREATE SESSION')
and a.GRANTEE = b.username
order by 1;

Any input would be appreciated.

Thanks,
HJ
This post has been answered by Sudhakar_B on Jul 9 2010
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 9 2010
Added on Jul 9 2010
7 comments
2,784 views