> -----Original Message-----
> From: mike mon [mailto:[EMAIL PROTECTED]
> 
> Does anyone has script which can check "grant
> privilege" on a table and generate output for future
> usage?

If you're looking for a script to show existing grants on a table, you could modify 
this one (that shows existing table / column grants for all objects in a schema)

set verify off
set linesize 110
column sort_id noprint
column grantee format a25
column priv format a65
column grantable heading "ADM" format a3
 select
    5 as sort_id,
    d.grantee,
    d.privilege || ' on "' || d.owner ||
       '"."' || d.table_name || '"'
       as priv,
    d.grantable as grantable
  from
    dba_tab_privs d
  where
    d.owner = '&&enter_schema'
union
 select
    7 as sort_id,
    f.grantee,
    f.privilege || ' on "' || f.owner ||
       '"."' || f.table_name || '" ("' || f.column_name || '")'
       as priv,
    f.grantable as grantable
  from
    dba_col_privs f
  where
    f.owner = '&&enter_schema'
order by 1, 2, 3 ;
undefine enter_schema
clear columns
set linesize 80
set verify on
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: Jacques Kilchoer
  INET: [EMAIL PROTECTED]

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).

Reply via email to