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

Home -> Community -> Usenet -> c.d.o.server -> Re: grant and role

Re: grant and role

From: l <mladen_delic_at_yahoo.com>
Date: Wed, 9 May 2001 15:48:31 +0200
Message-ID: <9ddioi$5i0$1@ss204.hinet.hr>

Try this:
select 'GRANT SELECT ON ''EXAMPLE". ' || table_name || ' TO "REXAMPLE"' || ';' from user_tables order by table_name; Now use copy paste in SQLPlus.

"andy" <news_at_info-line.it> wrote in message news:3af94103.22120006_at_news.cis.dfn.de...
> I have an Oracle 8.1.6 database installed on Windows NT4.
> I have a tablespace 'example' and a user with the same name.
> I've created a role called 'rexample'.
> The user own some object, in particular some tables.
> I've assigned 'connect' and 'rexample' roles to the users. At this
> point i would like to grant object privileges on role 'rexample'.
>
> One solution is:
>
> GRANT SELECT ON "EXAMPLE"."OBJECT1" TO "REXAMPLE";
> GRANT SELECT ON "EXAMPLE"."OBJECT2" TO "REXAMPLE";
> GRANT SELECT ON "EXAMPLE"."OBJECT3" TO "REXAMPLE";
>
> ...
>
> But there is a lot of objects in tablespace and the object can be
> added sometimes.
> I would like to have a command (e.g. a stored procedure) that grant
> all the obects automatically.
>
>
> Thanks in advance.
>
> Andy.
>
Received on Wed May 09 2001 - 08:48:31 CDT

Original text of this message

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