03 Jul Applying a SQL Profile and the ORA-13786 error
Here is a quick tip that mainly comes from an OEM bug.
In OEM you had a tuning task, and the result of this tuning tasks is advising you that if you apply a profile you go from a Full table scan to a Parallel Execution of the FTS , reducing your CPU cost.
You can view the results of the Tuning Advisor Task with the query below
In there you will find the recomendations, like the one below and you will try to make a decision
But when you try to apply it , you get this error:
There was a problem creating the SQL Profile ORA-13786: missing SQL text of statement object “1” for tuning task
The thing is that there is a bug in OEM 11g where if it’s for a parallel execution, it errors out , this is caused by bug 10313110 in OEM.
The quick workaround is that you just have to apply it manually with the option DBMS_SQLTUNE.PX_PROFILE and you are set 🙂