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: Ways to fake table in own scema.

Re: Ways to fake table in own scema.

From: NetComrade <andreyNSPAM_at_bookexchange.net>
Date: Tue, 31 Aug 1999 18:36:47 GMT
Message-ID: <37cc1f95.104096570@news.earthlink.net>


Your problem is probobly the part where you have to do a manual grant for each table, you can do something like this. connect user1/passwd
select 'GRANT SELECT ON '||table_name||' TO USER2;' from USER_TABLES; (now run the generated script)
connect user2/passed
select 'CREATE SYNONYM '||table_name||' FOR '||owner||'.'|||table_name||';' from all_tables; (run this generated script)

On Fri, 27 Aug 1999 12:08:24 GMT, gm_at_offline.no (G. Mjoen) wrote:

>I have a user (USER1) with a lot of tabes. I created a new user
>(USER2) with no tables in his/hers schema. USER2 is granted select on
>all of USER1's tables.
>
>The problem is:
>
>USER2 needs to write 'select * from USER1.TABLE1' instead of 'select *
>from TABLE1'.
>
>I am able to fix this by creating a synonym for each table. Is there
>som other way of doing this?
>
>--
>Gaute


Andrey Dmitriev	 eFax: (978) 383-5892  Daytime: (917) 373-5417
AOL: NetComrade	 ICQ: 11340726 remove NSPAM to email

Received on Tue Aug 31 1999 - 13:36:47 CDT

Original text of this message

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