Database Security Products (MOSC)

MOSC Banner

Cannot select table within stored procedure/function unless granted select any table

edited Oct 7, 2009 11:08PM in Database Security Products (MOSC) 4 commentsAnswered ✓
 I have an account within Oracle that has been granted select for a table residing in another schema.  I am able to perform a normal select on the table from SQL.  However, when I try to create a stored function and declare a cursor to select from that table the compilation fails and the error indicates that table is not found.    I tried prefixing the table with the schema name and also tried using a synonym to point to the table but the error is still the same.
However, when the DBA grants the account "Select any table" rights, the problem goes away.   This seems that I am granting too much rights to overcome this issue.  What is causing this and how do I overcome this problem.   

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center