Ora-00905 doing explain plan

When I try to do an explain plan from the editor window I get an ORA-00905 "missing keyword" (please see the attached). When I run the SQL from the editor window the SQL runs without errors.

Turn on spool SQL to see where the problem is. Post the output here if you need to.

I tried to reproduce but cannot. If this happens again I will turn on SPOOL.

I got it reproduced. Please see the attached.Debug.SQL (26.4 KB)

2 cents? https://support.quest.com/fr-fr/toad-for-oracle/kb/71732/running-the-explain-plan-displays-ora-00905-missing-keyword-error-message

I think maybe the problem is that Toad is trying to explain into PUBLIC.PLAN_TABLE instead of just PLAN_TABLE. @espotnitz, what do you have in Options -> Oracle -> General for "Explain Plan"? If PUBLIC is listed for the schema, remove it. I can reproduce this problem if PUBLIC is specified there. If you think there is some other cause, please let me know. I'll make a change for 15.1 so that we never specify "PUBLIC" even if that's what you have in the options.

I think the reason that it sometimes works is that you have the "used cached plan if possible" option checked, and when it finds the cached plan, it doesn't have to do the "explain plan into" command, so there is no error.

@avergison I think that was just a bug in very old versions of Toad.

1 Like

Removing the PUBLIC fixed the isssue. Thank you

1 Like

This demonstrates how UNhelpful error messages can be ...

-- ORA-00905: missing keyword

1 Like