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: Difference between PUBLIC and "PUBLIC"

Re: Difference between PUBLIC and "PUBLIC"

From: <sigdock_at_my-deja.com>
Date: Tue, 09 Jan 2001 09:40:35 GMT
Message-ID: <93emaj$b4l$1@nnrp1.deja.com>

AFAIK the owner of all the v$% views is user SYS. Therfore, connecting as SYS and the granting should work fine. A second thing is that v$session is a public synonym for the view v_$session from owner SYS. I don't really know why the last grant, on "PUBLIC".v$session worked right but my best guess is that it did because you granted a selectprivilege  on a public synonym. This doesn't mean that the granted user is able to see the data since the underlying view, in your case v_ $session, also has to be granted. A third point is that, AFAIK, PUBLIC is a special sort of role that doesn't own any objects at all. Because of all these things we decided to grant select on all V_$% views to PUBLIC and create the default public synonyms.

h.t.h.

BertJan Meinders
Oracle DBA
ASR-ICT In article <93eagh$2dd$1_at_nnrp1.deja.com>,   Atta ur-Rehman <atta707_at_my-deja.com> wrote:
> Dear all,
>
> please consider this:
>
> when I try to grant select priv on v$session without qualifying it
 with
> the owner it generates ORA-02030 which SOUNDS out of context. Could
 you
> please explain the reasons for this error.
>
> SQLWKS> grant select on v$session to aces;
> grant select on v$session to aces
> *
> ORA-02030: can only select from fixed tables/views
>
> when i qualify the v$session with the owner public (in lower case):
> SQLWKS> grant select on public.v$session to aces;
> grant select on public.v$session to aces
> *
> ORA-00903: invalid table name
>
> That is oracle is unable to resolve the owner (in lower case). then i
> try to qualify the view with owner in upper case:
>
> SQLWKS> grant select on PUBLIC.v$session to aces;
> grant select on PUBLIC.v$session to aces
> *
> ORA-00903: invalid table name
>
> that doesn't work either.
>
> but the moment I enclose the owner, public, in double quotes it works:
>
> SQLWKS> grant select on "PUBLIC".v$session to aces;
> Statement processed.
>
> I know that the double quotes are used to preserve the oracle objects'
> names' case. but then isn't it true the becuase oracle by default,
> without double quotes, converts the object name to UPPER case; so
> PUBLIC and "PUBLIC" *should* be the same?
>
> any thoughts on above behavior would be greatly apprecaited. I'm using
> Oracle 8.0.4 on NT 4 and i've tried the same thing on 8.1.5 on NT with
> exactly the same results.
>
> Thanks in anticipation.
>
> regards,
>
> ATTA
> --
>
> getting the meanin' of data...
>
> Sent via Deja.com
> http://www.deja.com/
>

Sent via Deja.com
http://www.deja.com/ Received on Tue Jan 09 2001 - 03:40:35 CST

Original text of this message

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