Database Tuning (MOSC)

MOSC Banner

dbms_xplan.display_sql_plan_baseline gives ERROR: User has no SELECT privileges on objects of the SQ

edited Feb 25, 2020 4:06AM in Database Tuning (MOSC) 8 commentsAnswered ✓

Hi

Oracle 12.1.0.2.0

Can anyone understand, why is it not possible to view the baseline plan..?

ERROR: User has no SELECT privileges on objects of the SQL plan baseline

I have like granted dba, select_catalog_role, dba_sql_plan_baselines etc..

By the way, I also tried selecting it from sys user, no luck.

set lines 200;col sql_handle for a30;col plan_name for a30;col creator for a20;col origin for a20;col parsing_schema_name for a30;col version for a20;select sql_handle, plan_name, creator, origin, parsing_schema_name from dba_sql_plan_baselines;SQL_HANDLE                     PLAN_NAME                      CREATOR              ORIGIN               PARSING_SCHEMA_NAME------------------------------ ------------------------------ -------------------- -------------------- ------------------------------SQL_ab810f006b8453cc           SQL_PLAN_ar08g01ps8nyca751e18a SYSTEM               MANUAL-SQLTUNE       SYSTEMSET LONG 10000;SELECT * FROM TABLE(DBMS_XPLAN.display_sql_plan_baseline(plan_name=>'SQL_PLAN_ar08g01ps8nyca751e18a'));PLAN_TABLE_OUTPUT                                                               --------------------------------------------------------------------------------                                                                                --------------------------------------------------------------------------------SQL handle: SQL_ab810f006b8453cc                                                SQL text: select /*+  first_rows_100 */ ........              PLAN_TABLE_OUTPUT                                                               --------------------------------------------------------------------------------          to_number(sys_context('ETOIMIK', 'muut_8'))))))                       --------------------------------------------------------------------------------ERROR: User has no SELECT privileges on objects of the SQL plan baseline        24 rows selected.

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