In Toad, if user has Select privileges on a view from another schema. The user runs a Select statement and accesses the view successfully. Upon running an Explain Plan on the same query,user receives ORA-01031 insufficient privileges on underlying objects of the view.
In SQL Optimizer, if user attempts to use the Optimize option to tunea query results in the below error message. Query uses views and user has Select grants to the view. User can execute the Select statement in Toad successfully.
ORA-01031 insufficient privileges ..
User does not have Select grants to tables used to buildviews.
Grant Select privileges on all tables referenced by the view or Select Any Table. This is an Oracle requirement to perform an Explain Plan for the statement. Optimizer also executes an Explain Plan when tuning a query.
© ALL RIGHTS RESERVED. Feedback Terms of Use Privacy Cookie Preference Center