SET ECHO OFF
SET VERIFY OFF
SET LINESIZE 300
COL PRIVILEGE FOR A25
COL GRANTEE FOR A20
COL TABLE_NAME FOR A40
COL OWNER FOR A10
ACCEPT USUARIO PROMPT "Digite o nome do USUÁRIO: "
PROMPT VERIFICA OS PRIVILÉGIOS DO USUÁRIO EM TABELAS, ROLES e de SISTEMA
PROMPT
PROMPT ##
PROMPT PRIVILÉGIOS DE ROLES
PROMPT ##
SELECT GRANTEE, GRANTED_ROLE FROM DBA_ROLE_PRIVS WHERE GRANTEE = UPPER('&USUARIO')
/
PROMPT ##
PROMPT PRIVILÉGIOS DE TABELAS
PROMPT ##
SELECT GRANTEE, OWNER, TABLE_NAME, PRIVILEGE FROM DBA_TAB_PRIVS WHERE GRANTEE = UPPER('&USUARIO')
/
PROMPT ##
PROMPT PRIVILÉGIOS DE SISTEMAS
PROMPT ##
SELECT GRANTEE, PRIVILEGE FROM DBA_SYS_PRIVS WHERE GRANTEE = UPPER('&USUARIO')
/