Find users with CREATE SESSION privilege.
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