Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Schemas and authorizations
Wolf 'n Pinguin wrote:
> Hi Everybody,
>
> I have the following problem:
>
> I have a couple of schemas (SCHEMA1, SCHEMA2, SCHEMA3, etc ) each of which
> contains an identical datamodel. The number of schemas can get quite
> large.
>
> I wish to create a user, and allow it SELECT privileges on all tables/views
> in SCHEMA1 and SCHEMA2, but not on other schemas.
>
> Is there an easy way to accomplish this?
>
> Thanx in advance, Ide
The easy way is to write a stored procedure that goes through USER_OBJECTS selecting object_name and object_type. Then builds a string with the object privileges you want and grants them to a role using dynamic SQL.
Then you can assign the role to any user you wish.
Daniel A. Morgan Received on Sat May 05 2001 - 18:22:34 CDT