In a non-sys, system User's stored procedure, query the View starting with v $, such as v $ mystat and v $ statname. These View queries can be used in stored procedures only after authorization is displayed under sys. However, if we use grantonv $ viewtousername, we will receive a ORA-02030 error. SQLgrantselectonv $ my
In a non-sys, system User's stored procedure, query the View starting with v $, such as v $ mystat and v $ statname. These View queries can be used in stored procedures only after authorization is displayed under sys. However, if we use grant on v $ view to username, we will receive a ORA-02030 error. SQL grant select on v $ my
In a non-sys, system User's stored procedure, query the View starting with v $, such as v $ mystat and v $ statname. These View queries can be used in stored procedures only after authorization is displayed under sys.
However, if we use grant on v $ view to username, we will receive a ORA-02030 error.
As follows:
SQL> grant select on v $ mystat to scott;
Grant select on v $ mystat to scott
ORA-02030: only queries from a fixed table/View
This is because v $ mystat is not a view and is actually a synonym.
Therefore, you must authorize the view corresponding to the synonym.
SQL> grant select on v _ $ mystat to scott;
Grant succeeded
Tips. You can also try it.