The error "ORA-00905: missing keyword" shows in the Session Browser | Explain Plan tab, after the following script has been run.
To reproduce the issue:
1. Open SQL*Plus and connect to Database
2. Open Toad and connect to Database
3. In Toad open the Database | Monitor | Session Browser window
4. Go into SQL*Plus and run the following code
------start---------
DECLARE
vnumber number;
BEGIN
FOR i IN 1 .. 50000
LOOP
-- statement 1:
-- Plan
-- SELECT STATEMENT CHOOSE
-- 1 TABLE ACCESS FULL SYS.DUAL
SELECT 1
INTO vnumber
FROM DUAL;
-- statement 2:
-- Plan
-- SELECT STATEMENT CHOOSE
-- 5 SORT AGGREGATE
-- 4 VIEW PLS.
-- 3 UNION-ALL
-- 1 TABLE ACCESS FULL SYS.DUAL
-- 2 TABLE ACCESS FULL SYS.DUAL
SELECT COUNT ( * )
INTO vnumber
FROM (SELECT 1
FROM DUAL
UNION ALL
SELECT 1
FROM DUAL);
END LOOP;
END;
/
------end---------
5. While the script is running, go back into Toad and choose Current statement and look at Statement tab.
6. Wait until the script has completed and then change from "Statement" tab to "Explain Plan" tab.
7. In Toad, the error message: "Explain Plan Error: ORA-00905: missing keyword" appears at the bottom of the screen.
The explain plan is no longer looking at "select 1 from dual" but the whole script.
WORKAROUND:
None
STATUS:
Waiting for fix in a future release of Toad for Oracle
© ALL RIGHTS RESERVED. Terms of Use Privacy Cookie Preference Center