1Z0-052 · Question #120
A database user SMITH tries to query the V$SESSION view and fails to access it as follows: Which are the two possible solutions to enable SMITH to query the data in V$SESSION? (Choose two.)
The correct answer is B. granting SELECT privilege to SMITH on V_$SESSION F. creating a view based on V$SESSION and granting SELECT privilege to SMITH on the view that. V$SESSION is a public synonym pointing to the underlying view V_$SESSION - privileges must be granted on the actual base view or via a user-created wrapper view.
Question
A database user SMITH tries to query the V$SESSION view and fails to access it as follows:
Which are the two possible solutions to enable SMITH to query the data in V$SESSION? (Choose two.)
Exhibit
Options
- Agranting SELECT privilege to SMITH on V$SESSION
- Bgranting SELECT privilege to SMITH on V_$SESSION
- Casking the user SMITH to run the catalog.sql script
- Dgranting SELECT privilege to SMITH on V$FIXED_TABLES
- Esetting the O7_DICTIONARY_ACCESSIBILITY parameter to TRUE
- Fcreating a view based on V$SESSION and granting SELECT privilege to SMITH on the view that
How the community answered
(21 responses)- B95% (20)
- D5% (1)
Why each option
V$SESSION is a public synonym pointing to the underlying view V_$SESSION - privileges must be granted on the actual base view or via a user-created wrapper view.
Oracle does not support granting privileges directly on a public synonym like V$SESSION - the grant must target the underlying base object V_$SESSION.
V$SESSION is a public synonym for V_$SESSION, which is the actual Oracle-created view; granting SELECT on V_$SESSION assigns the privilege on the real object and resolves SMITH's access error.
Running catalog.sql re-creates data dictionary objects and is a DBA-level maintenance operation; it does not grant individual users access to V$ views.
V$FIXED_TABLES contains metadata about fixed views, but granting SELECT on it does not propagate access rights to V$SESSION or any other dynamic performance view.
The O7_DICTIONARY_ACCESSIBILITY parameter is deprecated and enabling it introduces a security risk by allowing SELECT ANY TABLE to access dictionary objects, and it is not the recommended method for granting targeted view access.
Creating a user-defined view that queries V$SESSION and granting SELECT on that view to SMITH is a valid workaround because the view's definer already holds access rights and can propagate them through the wrapper view.
Concept tested: Granting access to Oracle V$ dynamic performance views
Source: https://docs.oracle.com/en/database/oracle/oracle-database/19/refrn/V-SESSION.html
Topics
Community Discussion
No community discussion yet for this question.
