grant SELECT access to v$session to other users

en Lopes picture en Lopes · Oct 4, 2017 · Viewed 16.2k times · Source

I want to grant SELECT access to v$session to other users in an Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production

but when I run this query:

SELECT owner, object_type FROM dba_objects WHERE object_name = 'V$SESSION';

I got this error:

00942. 00000 -  "table or view does not exist"

Answer

Cyrille MODIANO picture Cyrille MODIANO · Oct 4, 2017

Oracle v$ views are named V_$VIEWNAME and they have synonyms in format V$VIEWNAME and you can’t give privilege on a synonym. If you want to give permission to a V$ view you must give it like below

SQL> grant select on v_$session to hr;