Access tables within a stored procedure from another schema. Error: table or view does not exist
Oracle 19c
Issue: User JSMITH has read access to ALL tables in PHX_PROD schema via role, phx_prod_read. when running a simple function, getting error, Error: ora-00942: table or view does not exist.
Note: JSMITH can run select * from PHX_PROD.phx_dim and get the result.
I know I can give a direct grant to user JSMITH (grant select on PHX_PROD.phx_dim to jsmith;) and that works but the user phx_prod has 147 tables and I would like to avoid giving individual grants for each tables to JSMITH. Moreover, this user also have many other %_read roles on other schemas and I am trying to avoid giving access one table at a time.