views:

70

answers:

2

Trying to generate an explain plan in SQL Developer, the program puts up a message box with title "failed to query plan_table" complaining "invalid column name". The plan is not generated or displayed. How to fix?

+2  A: 

Execute this sql statement:

drop plan_table

SQL Developer automatically regenerated the proper table & displayed the correct plan after pressing F6 again.

Barett
+2  A: 

Normally PLAN_TABLE is a public synonym pointing to a table owned by SYS (e.g. SYS.PLAN_TABLE$ in 11g.)

If you have recently upgraded the database, the plan_table is likely still "old" and needs to be upgraded (by the dba)

Each user should not have to worry about creating their own plan_table.

Patrick Marchand
+1... additionally, be sure the ?/rdbms/admin/catplan.sql script is used to create the new version as a global temporary table, which offers some isolation advantages.
dpbradley