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: Bob Fazio <bob_fazio_at_hotmail.com.no.spam>
Date: Tue, 31 Aug 1999 00:16:16 GMT
Message-ID: <k9Fy3.2221$E46.1635@news.rdc1.pa.home.com>


Although I recommend that you use synonyms, there is another way. This way is only good for a single session. You can issue this statement at any time though you want to use a particular schema other than your own.

SQL> alter session set current_schema="USER1";

From that point on all references will be to schema one. Note this doesn't change what the function user returns, so the following will stay the same.

SQL> select user from dual;

user2

G. Mjoen <gm_at_offline.no> wrote in message news:37c67e9a.192354751_at_info.telenor.no...
> 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
Received on Mon Aug 30 1999 - 19:16:16 CDT

Original text of this message

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