Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot find table v$parameter in Oracle

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

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

But I get 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:

Maybe the Oracle user that I use is not privileged?

like image 936
Peter Penzov Avatar asked Feb 17 '13 18:02

Peter Penzov


People also ask

How do you grant access to V parameters?

Answers. Connect with SYSDBA privilege and run: SQL> show user USER est "SYS" SQL> grant select on v_$parameter to test; Autorisation de privilèges (GRANT) acceptee.

What is V parameter Oracle?

V$PARAMETER displays information about the initialization parameters that are currently in effect for the session. A new session inherits parameter values from the instance-wide values displayed by the V$SYSTEM_PARAMETER view. Column. Datatype.

Where are Oracle parameters stored?

The default location in UNIX for the server parameter file or text initialization parameter file is $ORACLE_HOME/dbs. On Windows, the default location is ORACLE_HOME/dbs.

What is hidden parameter in Oracle?

The hidden parameters in oracle database start with “_”. It is not possible to see the hidden parameters by command “show parameter” or querying v$parameter unless the hidden parameter set explicitly set in init. ora file. Following query can be use to see hidden parameters: SELECT x.


1 Answers

Generally the better approach is to use a procedure and grant the necessary privileges to this procedure. However if you want use SQL directly, you can grant SELECT_CATALOG_ROLE or SELECT ANY DICTIONARY to the user.

like image 185
steve Avatar answered Oct 05 '22 04:10

steve