Wednesday, August 18, 2010

Privileges assigned to a user or schema

In Oracle what are the privileges assigned to a user or schema
set pages 10000 line 200
col owner format a20
col table_name format a30
col privilege format a30

select owner, table_name, privilege
from dba_tab_privs
where grantee = '&USER'
union all
select null, null, privilege
from dba_sys_privs
where grantee = '&USER'
union all
select null, null, granted_role
from dba_role_privs
where grantee = '&USER';

No comments: