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.
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';