问题
I have access on tables but when I run the same query in Anonymous block it fails with
ORA-00942: table or view does not exist
回答1:
The Oracle security model means that we cannot build database objects (views, stored procedures, etc) using privileges granted to our account through a role. The privileges have to be explicitly granted to our named account.
This applies to anonymous blocks as well.
So, if you want to build PL/SQL which runs against database objects in other schemas you will have to ask the schema owner - or the DBA - to grant you the privileges you need.
来源:https://stackoverflow.com/questions/5780224/do-procedures-need-separate-access-rights-on-tables