serveroutput in the command window of PLSQL Developer
652398May 8 2013 — edited May 8 2013In sqlplus, I input the following SQL:
SQL> set serveroutput on
SQL> show serveroutput
serveroutput ON SIZE UNLIMITED FORMAT WORD_WRAPPED
SQL> select /*+ no_index(t1 idx_t1) */ * from t1 where n=3;
N
----------
3
SQL> select * from table(dbms_xplan.display_cursor(null,null,'advanced'));
PLAN_TABLE_OUTPUT
...
While I input the same SQL in PLSQL Developer:
SQL> select * from table(dbms_xplan.display_cursor(null,null,'advanced'));
PLAN_TABLE_OUTPUT
------------------------------------------------------------------------------------------------------------------------------------------------------
SQL_ID 9babjv8yq8ru3, child number 0
BEGIN DBMS_OUTPUT.GET_LINES(:LINES, :NUMLINES); END;
NOTE: cannot fetch plan for SQL_ID: 9babjv8yq8ru3, CHILD_NUMBER: 0
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_plan)
And the most important is:
SQL> show serveroutput
SQL>
The result of it is empty.
The reason for that is serveroutput is only supported in sqlplus not PLSQL? I know serveroutput is sqlplus language not SQL. However I use "show serveroutput" in command window of PLSQL Developer which is the same as sqlplus. What's the real reason for that?
Thanks for your kindly reply.