Skip to Main Content

Breadcrumb

May 4th

Question and Answer

Chris Saxon

Thanks for the question, Chris.

Asked: May 02, 2019 - 2:29 pm UTC

Last updated: May 02, 2019 - 4:51 pm UTC

Version: 11.2

Viewed 1000+ times

You Asked

A vendor would like me to run a script against a client's database. The script requires 'SYS' user access and makes the following grants:

grant select on sys.gv_\$mystat to public;

grant select on sys.gv_\$vsession to public;


I don't have access to the SYS user account, to get this will take some time, but I'm sure that this script has been run on the database in the past, so the privileges provided by these 2 grant statements will be in place.

Can I check for the privileges granted by these 2 statements without SYS user access in order to validate the requirement to run the script or not? I do have SYSTEM user access.

and Chris said...

Well, it's granted to public. So you could connect as a low privilege user and see they can query those views!

Or query tab_privs:

select grantee, privilege from dba_tab_privs
where  owner = 'SYS'
and    table_name = 'GV_$MYSTAT';


Is this answer out of date? If it is, please let us know via a Comment

More to Explore

Design

New to good database design? Check out Chris Saxon's full fundamentals class.