Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: GRANT SELECT to sys.dba_*
On Fri, 12 Jun 1998 21:38:20 +1000, Dominic Lancaster <landom_at_bimberi.com.au> wrote:
>Can someone help me with the syntax to allow me to set
>what is essentially read access only for one user to the sys.dba_*
>tables, I was thinking of:
>GRANT SELECT ON TABLE like 'sys.dba%' TO USER;
>
>would this work
Not exactly. But you could select the grant statements, spool them to a file, and then execute that file. Take a look at the following:
SQL> set pagesize 0 SQL> set heading off SQL> spool c:\a\grant.sql SQL> l 1 select 'grant select on ' 2 || view_name || ' to XXX;'
grant select on DBA_2PC_NEIGHBORS to XXX; grant select on DBA_2PC_PENDING to XXX; grant select on DBA_ALL_TABLES to XXX; grant select on DBA_ANALYZE_OBJECTS to XXX; grant select on DBA_AUDIT_EXISTS to XXX; ...
![]() |
![]() |