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