SET VERIFY OFF FEED OFF
COL PRIVILEGIOS FORMAT A80
COL QUOTAS      FORMAT A80
DEFINE P1=UPPER('&1.')

SELECT 'GRANT ' || PRIVILEGE    || ' ON ' || OWNER || '.' || TABLE_NAME || ' TO ' || GRANTEE || ';'
FROM DBA_TAB_PRIVS  WHERE TABLE_NAME=&P1.
ORDER BY 1
/

PROMPT
UNDEFINE P1
UNDEFINE 1
SET FEED ON

//-- --REVOKE --------------------------------------------------------------------------------------------
SET VERIFY OFF FEED OFF DEFINE ON PAGES 5000

COL PRIVILEGIOS FORMAT A110
COL QUOTAS      FORMAT A80
COL USUARIO     FORMAT A80

SELECT 'REVOKE /* OBJPRIV */ ' || PRIVILEGE    || ' ON ' || OWNER || '.' || TABLE_NAME || ' FROM ' || GRANTEE || ';' PRIVILEGIOS
FROM DBA_TAB_PRIVS  WHERE GRANTEE= UPPER('&1.')
ORDER BY 1
/

PROMPT
SET FEED 6 PAGES 66
COL PRIVILEGIOS CLEAR
COL QUOTAS      CLEAR
COL USUARIO     CLEAR


hostgator