Cannot find table v$parameter in Oracle

百般思念 提交于 2019-12-10 15:36:12

问题


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?


回答1:


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.




回答2:


Probably. To grant the rights, you need to use the table name as V_$PARAMETER. It comes from some restriction when granting rights on dynamic views.




回答3:


using the privileges: - select any table, alter any table when running the grant as SYS with SYSDBA in Oracle 12c solved the issue for me.



来源:https://stackoverflow.com/questions/14924681/cannot-find-table-vparameter-in-oracle

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!