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: How to Grant 100 Tables to User?

Re: How to Grant 100 Tables to User?

From: horwinkle <whaddayamean_at_whaddayamean.com>
Date: Tue, 11 Feb 2003 20:15:41 -0500
Message-ID: <R7h2a.50089$dW2.8038@fe05.atl2.webusenet.com>


Log on as the owner of the tables using sqlplus and ...

select 'grant all on '||table_name||' to gates;' from user_tables;

This produces your grant statements. Spool them to a file, then run that file.

Hari Om wrote:
> Hi:
>
> I have a DB User LARRY and he has around 100 Tables (and other
> objects). I want to GRANT ALL these 100 Tables to another User GATES.
> How can I do that? I know I could do it manually eg:
> GRANT ALL ON TABLE1 to GATES;
> GRANT ALL ON TABLE1 to GATES;
> ...and so on.... but is there any way to do that only once (in one
> statement)?
>
> Secondly, when user GATES accesss Tables from user LARRY (after GRANTS
> is successful) then GATES has to use LARRY.TABLE1? So is there any way
> for GATES to access tables without prefixing LARRY?
> Do I have to CREAT SYNONYM for all the 100 Tables...? Or is there any
> better approach?
>
> Thanks!
>
> HARI OM
Received on Tue Feb 11 2003 - 19:15:41 CST

Original text of this message

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