To check privileges users have on an object ( Table / Pkg / Procedure ) :-
select a.OBJECT_NAME,a.OBJECT_TYPE,
a.OWNER,b.GRANTEE,
b.GRANTOR,b.PRIVILEGE,
b.GRANTABLE from dba_objects a,dba_tab_privs b
where a.OWNER=b.OWNER
and a.OBJECT_NAME='&OBJ_NAME';
To check the privileges ( select /execute /debug /read etc ) a user had on an object ( Table / Package / Procedure ) :-
select distinct a.OBJECT_NAME,a.OBJECT_TYPE,
a.OWNER,b.GRANTEE,b.GRANTOR,b.PRIVILEGE,
b.GRANTABLE from dba_objects a,dba_tab_privs b
where a.OWNER=b.OWNER
and a.OBJECT_NAME='&OBJ_NAME'
and b.GRANTEE='&USER';
UR's Key Run ;-)
No comments:
Post a Comment