Cannot find table parameter v $ in Oracle

I want to get the number of sessions in Oracle using a SQL query:

SELECT value FROM v$parameter WHERE name = 'sessions'

      

But I am getting this error:

Error starting at line 1 in command:
SELECT value FROM v$parameter WHERE name = 'sessions'
Error at Command Line:1 Column:18
Error report:
SQL Error: ORA-00942: table or view does not exist
00942. 00000 -  "table or view does not exist"
*Cause:    
*Action:

      

Perhaps the Oracle user I'm using doesn't have privileges?

+3


source to share


3 answers


Generally, the best approach is to use a procedure and grant the necessary rights for that procedure. However, if you want to use SQL directly, you can provide SELECT_CATALOG_ROLE

either to the SELECT ANY DICTIONARY

user.



+4


source


Maybe. To grant rights, you need to use the table name as V_$PARAMETER

. This is due to some limitations when granting rights to dynamic views.



+4


source


using privileges: - select any table, change any table when doing grant as SYS with SYSDBA in Oracle 12c solved the problem for me.

-2


source







All Articles