How can I force a stored outline from sqlplan in the past that is in dba_dba_hist_sql_plan
We have noticed a performance issue with our batch processing. After bounce the batch processing went fine. Notice the top SQL has taken a different path now (different plan) altogether. We have reporting database that is previous day of the OLTP production database. I can see the bad and good plan in the dba_hist_sql_plan. I wanted to force the sql to take the bad plan using stored outlines and test the batch issue. Please advise how I can do this.
I know if the sql plan is in the v$sql I can used dbms_outln.create_outline to create stored outlines. How can I do the same if the plan is in the history that I want to enforce.