Whenever I run the below script inside of a command window:
set serveroutput off
select * from dual;
select * from table(dbms_xplan.display_cursor);
I get the below output:
PLAN_TABLE_OUTPUT
--------------------------------------------------------------------------------
SQL_ID 9m7787camwh4m, child number 2
begin :id := sys.dbms_transaction.local_transaction_id; end;
NOTE: cannot fetch plan for SQL_ID: 9m7787camwh4m, CHILD_NUMBER: 2
Please verify value of SQL_ID and CHILD_NUMBER;
It could also be that the plan is no longer in cursor cache (check v$sql_p
If I run the same script inside of Oracle SQL*Plus, I get the correct output:
PLAN_TABLE_OUTPUT
---------------------------------------------------------------------------
SQL_ID a5ks9fhw2v9s1, child number 0
-------------------------------------
select * from dual
Plan hash value: 272002086
--------------------------------------------------------------------------
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
--------------------------------------------------------------------------
| 0 | SELECT STATEMENT | | | | 2 (100)| |
| 1 | TABLE ACCESS FULL| DUAL | 1 | 2 | 2 (0)| 00:00:01 |
PLAN_TABLE_OUTPUT
---------------------------------------------------------------------------
Am I doing something wrong in PL/SQL Dev or is there something else wrong?
Thanks,
Joe