Re: GRANT Help
Date: 1996/05/22
Message-ID: <31A3A75E.BA6_at_flash.net>#1/1
Chakravarthy Nalamotu wrote:
>
> Hi All,
> Is there a way to grant Object Privileges
> (ALTER, SELECT etc.) on all the objects
> in a schema to a role?
>
>
> GRANT ALTER, SELECT
> ON owner
> TO role1
>
> and was expecting the statement to give "ALTER"
> and "SELECT" privileges to all the objects in
> the "owner" schema.
> Hello Chakravarthy,
You can automate granting privileges on all objects in a schema using the following technique.
- Use SQL statement to generate Grant statements for all objects
- Execute the generated Grant statements.
rem SQL to generate grant statements
set echo off feedback off
spool gr.sql
select 'grant alter, select on ' || table_name || ' to role_name;'
from user_tables;
spool off
start gr
exit
This is better than typing grant statement for every object.
Good Luck
Sid Poondla siyapra_at_flash.net
Oracle Consultant
Received on Wed May 22 1996 - 00:00:00 CEST