Database Scripts

Beta
 Log In    |   Sign Up

Oracle : Grant Delete Privilege on Table Schemas

Added on Apr-09-2012 by tonyreg
For Oracle

Tags : delete

This scripts gives delete privileges for schema tables to a user/role.

Versions

Oracle 9i

DOWNLOAD

SET PAGESIZE 0
SET FEEDBACK OFF
SET VERIFY OFF

SPOOL temp.sql

SELECT 'GRANT DELETE ON "' || u.table_name || '" TO &1;'
FROM   user_tables u
WHERE  NOT EXISTS (SELECT '1'
                   FROM   all_tab_privs a
                   WHERE  a.grantee    = UPPER('&1')
                   AND    a.privilege  = 'DELETE'
                   AND    a.table_name = u.table_name);

SPOOL OFF

@temp.sql

-- Comment out following line to prevent immediate run
@temp.sql

SET PAGESIZE 14
SET FEEDBACK ON
SET VERIFY ON


    

Report Script

blog comments powered by Disqus