Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

serveroutput in the command window of PLSQL Developer

652398May 8 2013 — edited May 8 2013
In 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.
This post has been answered by Hoek on May 8 2013
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 5 2013
Added on May 8 2013
2 comments
1,560 views