Oracle Error ORA-29391: string and string must be mandatory to create a mandatory plan directive

Oracle Error Message

ORA-29391: string and string must be mandatory to create a mandatory plan directive

Reason for the Error

An attempt was made to create a mandatory plan directive where either PLAN or GROUP_OR_SUBPLAN or both were not mandatory

Solution

Recreate these objects as mandatory and then create the plan directive.