Error: cannot fetch last explain plan from plan_table

OS: Solaris 10
DB: 10.2.0.3
today encountered such a strange thing, using dbms_xplan.display a SQL execution plan, “Error: cannot fetch last explain plan from plan_table”. At the beginning think Plan_table version is out of date, also did not look carefully, then regenerate Plan_table, just run SQL, or report the same error, so it is not Plan_table version of the problem, will it be the SQL itself?Change SQL: select sysdate from Dual, dbMS_xplan.display to display the correct result, run the SQL in question again, the error still remains. Judging from the above phenomenon, that should be the problem with SQL itself.
analyze the SQL in question, mainly several views, these views are based on db link, db link side of the data version is 9.2.0.8, could this be caused by this reason?Delete the 10G plan_table, run the 9i UTlxplan.sql, and run the statement with the problem just now, dbMS_xplan.display displays the result normally.
there is another method, manually update the plan_id field in the 10G plan_table, set the plan_id in the record to a value, dbms_xplan.display can display the result normally.

From “ITPUB blog” link: http://blog.itpub.net/45188/viewspace-1022784/, if you want to reprint, please indicate the source, otherwise will be investigated for legal responsibility.

Reproduced in: http://blog.itpub.net/45188/viewspace-1022784/

Read More: