SET SERVEROUTPUT ON is a SQL*Plus command. You have to set this ON in your SQL*Plus session so that the messages are dumped to the screen. You will have to use dbms_output.put_line stmts in your PL/SQL block or procedure or function to display the messages.
SQL> set serveroutput on
2 dbms_output.put_line('Hi ...');
PL/SQL procedure successfully completed.
Hope this helps !!
Originally posted by WhiZa
Why do I get an error (PLS-00103) when I put "SET SERVEROUTPUT ON" in my procedure using SQL-Programmer? anyone else have this problem?
I need to display output with dbms_output.put_line so setting it on seems to be the only way.
If you want your stored procedures/fucntions to return output info outside SQL*PLus - then use UTL_FILE package to write the messages to OS file. This way you can get debug information during run time (you don't have to wait the procedure to complete as with DBMS_OUTPUT).
If you have *NIX based OS - $ tail -f filename , will display you the messages in a real time.