Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Could someone let me know what is the purpose of using set serveroutput on/off in oracle?

I ran the below query to see what it is doing. However I need to know much about serveroutput. Kindly help me

 set serveroutput on;
     select * from tab;
    select * from tab;
     select * from tab;
     set serveroutput off;
share|improve this question

closed as off-topic by a_horse_with_no_name, RolandoMySQLDBA, Mark Storey-Smith, Max Vernon, Michael - sqlbot Oct 23 '13 at 11:55

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Too localized - this could be because your code has a typo, basic error, or is not relevant to most of our audience. Consider revising your question so that it appeals to a broader audience. As it stands, the question is unlikely to help other users (regarding typo questions, see this meta question for background)." – RolandoMySQLDBA, Michael - sqlbot
If this question can be reworded to fit the rules in the help center, please edit the question.

1  
set serveroutput [on|off] is used to enable or disable the output made by the DBMS_OUTPUT package, for example in sql*Plus; in your example, it has no effect. – Nicolas Durand Oct 22 '13 at 13:09
    
Thank you Nicolas :) Any weblinks which will give more information would be much beneficial. However Now I understood the purpose of set serveroutput. Thanks a lot – user3475 Oct 22 '13 at 13:39
    
Oracle 11.2 SQLPlus Reference: docs.oracle.com/cd/E11882_01/server.112/e16604/… – MGS Oct 22 '13 at 14:24

set serveroutput on executed in SQL Plus executes behind the scenes:

dbms_output.enable(buffer_size => NULL);

set serveroutput off executes:

dbms_output.disable;
share|improve this answer
    
Thanks phill...makes sense thanks a lot – user3475 Oct 22 '13 at 18:55

Not the answer you're looking for? Browse other questions tagged or ask your own question.