Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

grant SELECT access to v$session to other users

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"
like image 551
en Lopes Avatar asked Jan 30 '23 11:01

en Lopes


1 Answers

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;
like image 61
Cyrille MODIANO Avatar answered Feb 03 '23 06:02

Cyrille MODIANO