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: Granting select access to another users objects

Re: Granting select access to another users objects

From: Michel Cadot <micadot_at_altern.org>
Date: Wed, 28 Jul 1999 11:59:53 +0200
Message-ID: <7nmkc2$7r4$1@oceanite.cybercable.fr>

Chuck a écrit dans le message <379e0f0b.806156351_at_client.sw.news.psi.net>...
>
>How can I easily give one schema access to all objects owned by
>another schema?
>
>(By access I mean the select any table privilege)
>
>-CC
>

Hello Chuck,

You can use the following script when connected as the owner of the objects.
The first "select" generates the statements granting the select privilege on all tables, views, ... and the second one the statements granting execute on procedures, ...

set heading off
set feedback off
set pagesize 0
set linesize 100
set trimspool on
spool grant_read.sql
select 'grant select on '||object_name||' to <other_user>;' from user_objects where object_type in ('TABLE','VIEW','SEQUENCE'); select 'grant execute on '||object_name||' to <other_user>;' from user_objects where object_type in ('PROCEDURE','FUNCTION','PACKAGE'); spool off

Then you execute the script "grant_read.sql" generated.

I hope this helps. Received on Wed Jul 28 1999 - 04:59:53 CDT

Original text of this message

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