While in Optmize SQL, open session, enter SQL statement, then click "explain plan" link on the right or on the toolbar. The error "Unable to load Plan Baseline SQL Handle from current SQL, which may not be deployed" is given. The same error is given if clicking "Generate Plan" or "Auto Optimize".
This is an issue when trying to rewrite/optimize or run explain plan under Plan Control.
1. Plan Baseline may not be deployed for the noted SQL and connection.
2. Another possible cause is that user does not have permission to execute SYS.DBMS_SQL
RESOLUTION 1: To optimize a query, you do not need to use "Plan Control Session". To optimizer, just choose "SQL Rewrite Session".
If "Plan Control" is needed, set up and enable the plan baseline on the Oracle end. For further info about using Plan Control Session in Optimizer, check the Help topic, Tutorial: Optimize SQL "(Plan Control)".
WORKAROUND 2:
Get DBA to give the Oracle user execute permissions on SYS.DBMS_SQL if Plan Control is needed
STATUS
Enhancement Request ST 96250 has been submitted to check for permissions to execute DBMS_SQL
© 2025 Quest Software Inc. ALL RIGHTS RESERVED. Terms of Use Privacy Cookie Preference Center