Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.tools -> Re: Creaste a view based on v_$session

Re: Creaste a view based on v_$session

From: Brian Tkatch <SPAMBLOCK.Maxwell_Smart_at_ThePentagon.com.SPAMBLOCK>
Date: 2000/09/21
Message-ID: <39ca2684.167138453@news.alt.net>#1/1

On Thu, 21 Sep 2000 14:19:35 GMT, Brian Peasland <peasland_at_edcmail.cr.usgs.gov> wrote:

>> 1) Why could I select it directly but not from a view that uses that
>> same exact select statement? In the end the same user (me) runs both,
>> so why should privileges be digfferent?
>
>I'm not sure why you are getting this, but your original post indicated
>that the user running the query could not see the SYS.V_$SESSION view.
>This means that the user running the query does not have SELECT privs on
>that view.

The user could see it. The query itself ran just fine. That user than create the view I originally posted, and the error appeared.

>
>> 2) I am afraid I do not understand. What is the difference betwen V_$
>> and V$?
>
>In reality, there are no V$ views. When you create the database, there
>are numerous V_$ views that are created in the SYS schema. After the V_$
>views are created, a synonym is created for the view. The synonym is the
>V$ item most people access. So when you select from V$SESSION, Oracle
>sees that V$SESSION is really a synonym for SYS.V_$SESSION. V$ is the
>synonym and V_$ is the corresponding view.
>
>Since V$ is a synonym, you can't grant SELECT privileges on it. You need
>to grant SELECT privs on the view, not the synonym. So you have to sign
>on to the db as SYS and grant SELECT on V_$, not V$.
Thanx, I did not know that.

Brian Received on Thu Sep 21 2000 - 00:00:00 CDT

Original text of this message

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