Re: Finding empty Role(s)

From: Jonathan Lewis <jlewisoracle_at_gmail.com>
Date: Wed, 13 May 2020 06:44:06 +0100
Message-ID: <CAGtsp8njiMVUuVBQUR99aCk4TNse7m-ybejPg616mj2Gautk6w_at_mail.gmail.com>



A role may have object, system, or role privileges granted to it, so "empty" has to check further than just dba_tab_privs. I think the following should be adequate (typos excepted, I#m not in front of a server at present):

select role from dba_roles
minus
select grantee from dba_tab_;privs
minus
select grantee from dba_role_privs
minus
select grantee from dba_sys_privs
;

Regards
Jonathan Lewis

On Tue, May 12, 2020 at 3:14 PM Lyall Barbour <lyallbarbour_at_sanfranmail.com> wrote:

> Hello everyone,
> I'm either Googling the wrong keywords, or thinking about this too
> hard. I just revoked a ton of object privs from a non-prod database in
> preparation for doing a decommission of a specific schema in a large
> database for the Business. I'm now trying to find any Roles that are empty
> because of my revoking. Does anyone have a script to do this?
>
> TIA
> Lyall Barbour
> -- http://www.freelists.org/webpage/oracle-l

--
http://www.freelists.org/webpage/oracle-l
Received on Wed May 13 2020 - 07:44:06 CEST

Original text of this message