|René Nyffenegger's collection of things on the web|
René Nyffenegger on Oracle - Most wanted - Feedback
set serveroutput [SQL*pluS]
set serveroutput on set serveroutput off set serveroutput on size n set serveroutput on format word_wrapped set serveroutput on format truncated set serveroutput on size unlimited
By default, SQL*PLUS doesn't read what a PL/SQL programm has written with dbms_output. With set serveroutput on, this behaviour is changed.
The size unlimited clause comes with Oracle 10g Release 2.
Another quirk is: lines printed with dbms_output that start with blanks are displayed wrong by SQL*Plus: the blanks are cut. To avoid this, use the set serveroutput on format wrapped option.
Storing settings across sessions
Settings (such as serveroutput) can be stored accross sessions with the glogin.sql and/or login.sql file.
See also store.
SQL*Plus calls dbms_output.enable when someone
After enabling dbms_output, SQL*Plus calls dbms_output.get_line after each insert, update, delete, select statement or anonymous block.