Re: Accessing another user's tables

From: Oracle71 <oracle71_at_aol.com>
Date: 4 Jul 1994 11:00:04 -0400
Message-ID: <2v985k$a6f_at_search01.news.aol.com>


In article <16FD1141D9.JTHILL_at_us.oracle.com>, jthill_at_us.oracle.com (Jim Hill) writes:

>How do you do this?? This is what I need....
>
>>Just like that. 'CREATE USER theapp IDENTIFIED BY regit' and
 'GRANT >>CREATE
>>SYNONYM TO theapp'. "theapp" will now be able only to create
 synonyms, >>so
>>the application developer sets things up wherever they are, grants
 access
>>as usual, and signs on to theapp:
 

>>conn jojo/oof
>>create table blah...
>>grant all on blah to bar;
>>conn theapp/regit;
>>create synonym blah for jojo.blah;
>>conn bar/rab;
>>select * from theapp.blah;

*-----------------------------------------------------------
Just one little tidbit to add: the grant for the Oracle username intended to be the synonym custodian should look like this:

grant create session, create synonym to theapp;

or
create role syn_custodian;
grant create session, create synonym to syn_custodian; grant syn_custodian to theapp;
alter user theapp default role syn_custodian;

otherwise user "theapp" would not be able to log on to the Oracle database.

(I love roles; they're one of my favorite Oracle7 Server features, along with:
stored procedures, functions, packages
enhanced pl/sql
triggers
referential integrity and other constraints enforced in the database engine




R. (Scott) Hunter Database Administrator AT&T Tax Systems
shunter_at_cfotax.attmail.com rshunter_at_delphi.com Received on Mon Jul 04 1994 - 17:00:04 CEST

Original text of this message