Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Who is this called

Re: Who is this called

From: Mark C. Stock <mcstockX_at_Xenquery>
Date: Tue, 10 Jan 2006 08:09:42 -0500
Message-ID: <A_mdnVTMmYeEL17enZ2dnUVZ_tOdnZ2d@comcast.com>

<Kurt-Erich.Finger_at_hte-company.de> wrote in message news:1136896764.772288.82300_at_g47g2000cwa.googlegroups.com...
> Hallo,
> I would have searched google if I would know how this statement is
> called.
> I searched the SQL reference but could not find it.
> I use it but I don't know the term.
>
>
> select 'GRANT SELECT ON '||view_name||' to USER_ROLE ;'
> from ALL_VIEWS
> where owner = 'MYSELF'
> and view_name != 'SYSTEM'
> order by view_name ;
>
> best regards
> ke
>

a bit more information please...

where did you find this statement?
how are you using it? are you using it? (not sure what you mean by 'I user it but don't know the term')

this looks like a statement to generate GRANT statements -- it also looks to be somewhat poorly written, as USER_VIEWS would be the more appropriate data dictionary view to user, and the predicate "and view_name != 'SYSTEM'" looks incorrect (should probably be "and owner != 'SYSTEM'" or something like "and view_name not like 'SYSTEM%'")

a statement like this would be called from any SQL interface, such as SQL*Plus or iSQL*Plus, etc,., and the resulting rows would be cut-and-pasted back into the tool to exeute the grants

++ mcs Received on Tue Jan 10 2006 - 07:09:42 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US