8

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?

Barett
  • 5,826
  • 6
  • 51
  • 55

2 Answers2

10

Execute this sql statement:

drop table plan_table

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

chadclan
  • 68
  • 5
Barett
  • 5,826
  • 6
  • 51
  • 55
8

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
  • 3,405
  • 21
  • 13
  • 2
    +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 Aug 06 '10 at 21:47