Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Oracle 21c: select permission on v_$session

User_KC6Y3Jan 10 2022

I am migrating an Oracle 11g database to Oracle 21c.
In Oracle 11g, I was able to issue this sql:
GRANT select FROM v$session to <user>.
I use this in my Triggers since I commonly do this in Oracle 11g:
SELECT machine,
program,
USER
FROM sys.v_$session
WHERE audsid = USERENV('SESSIONID');

When I try this SQL in Oracle 21c connected as SYS user, I get this error:
GRANT SELECT ON v$session TO C##Agsoft2021
Error report -
ORA-02030: can only select from fixed tables/views
02030. 00000 - "can only select from fixed tables/views"
*Cause: An attempt is being made to perform an operation other than
a retrieval from a fixed table/view.
*Action: You may only select rows from fixed tables/views.
I was trying to understand the error "can only select from fixed tables/views" but don't understand this.
Did something change in Oracle 21c that I missed??
Thanks

This post has been answered by Solomon Yakobson on Jan 10 2022
Jump to Answer
Comments
Post Details
Added on Jan 10 2022
3 comments
583 views