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: EXECUTE ANY PROCEDURE

Re: EXECUTE ANY PROCEDURE

From: joel garry <joel-garry_at_home.com>
Date: 14 May 2007 13:25:15 -0700
Message-ID: <1179174315.062861.73340@n59g2000hsh.googlegroups.com>


On May 14, 11:19 am, Jeff Kish <jeff.k..._at_mro.com> wrote:

>
> I logged in as myuser and ran this to give JOE access to the schema data:
>
> begin
> for tab in (select view_name from all_views where owner = 'MYUSER') loop
> execute immediate 'grant select,insert,update, delete on ' || tab.view_name
> || ' to JOE';
> commit;
> end loop;
>
> for tab in (select table_name from all_tables where owner = 'MYUSER') loop
> execute immediate 'grant select,insert,update, delete on ' || tab.table_name
> || ' to JOE';
> commit;
> end loop;
>
> for tab in (select sequence_name from all_sequences where sequence_owner =
> 'MYUSER') loop
> execute immediate 'grant select on ' || tab.sequence_name || ' to JOE';
> commit;
> end loop;
>
> end;
> /

I'm thinking you might be trying to grant from schemata that are the names of the tables or sequences with this code. What happens when you remove the tab. from tab.table_name?

jg

--
@home.com is bogus.
http://stupidest.com/
Received on Mon May 14 2007 - 15:25:15 CDT

Original text of this message

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