select grantee
from dba_role_privs r, dba_users u
where granted_role ='RESOURCE' and
r.grantee = u.username and
u.account_status not like '%LOCKED%' and
grantee not in ('SYS','SYSTEM','DBSNMP')
union
select grantee
from dba_role_privs r, dba_users u
where r.grantee = u.username and
u.account_status not like '%LOCKED%' and
grantee not in ('SYS','SYSTEM','DBSNMP') and
granted_role in
( select grantee
from dba_role_privs
where granted_role = 'RESOURCE' and
grantee <> 'DBA');
Want to post your scripts here in this blog ? Email it to snojha@gmail.com. You will be rewarded for your scripts if selected by our experts.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment