When we tried to grant acceess on v$session to a user, we will get below error
SQL> GRANT SELECT ON v$session TO tst_usr;
grant select on v$session to tst_usr
*
ERROR at line 1:
ORA-02030: can only select from fixed tables/views
this is because v$session is not direct table, its a public synonym. so you need to grant access on direct table that is V_$SESSION
Below query shows on which table v$session synonym created.
select table_owner, table_name FROM dba_synonyms where synonym_name = ‘V$SESSION’;
TABLE_OWNER TABLE_NAME
————– ——————————
SYS V_$SESSION
above out put show V_$SESSION is the table, grant on table V_$SESSION equal to grant access on v$session
grant select on v_$session to tst_usr;
SQL> GRANT SELECT ON v$session TO tst_usr;
grant select on v$session to tst_usr
*
ERROR at line 1:
ORA-02030: can only select from fixed tables/views
this is because v$session is not direct table, its a public synonym. so you need to grant access on direct table that is V_$SESSION
Below query shows on which table v$session synonym created.
select table_owner, table_name FROM dba_synonyms where synonym_name = ‘V$SESSION’;
TABLE_OWNER TABLE_NAME
————– ——————————
SYS V_$SESSION
above out put show V_$SESSION is the table, grant on table V_$SESSION equal to grant access on v$session
grant select on v_$session to tst_usr;
No comments:
Post a Comment