SQL Developer has a DBMS Output panel you can open and add to your desktop. You then add a connection you want to poll, and then you enable polling. It’s about 4 clicks. If you want to increase the default buffer size from 20,000 characters, then that’s a few more clicks and keystrokes.
A friend of the blog (Thanks Koen!)…
Tweets by @koenlostrie
… suggested I share his favorite trick: using a code template to automatically enable serveroutput – which will show you anything your sessions puts to DBMS_OUTPUT.
SET SERVEROUT[PUT] {ON | OFF} [SIZE {n | UNL[IMITED]}] [FOR[MAT] {WRA[PPED] | WOR[D_WRAPPED] | TRU[NCATED]}]
Controls whether to display the output (that is, DBMS_OUTPUT PUT_LINE) of stored procedures or PL/SQL blocks in SQL*Plus.
To save typing that in, use a SQL Editor CODE TEMPLATE.
You could use a code snippet, but then you’ll have to open the snippets panel, find it, and then drag and drop it to your desktop.
Ok, I want me some serveroutput, and I want to clear the script output ‘screen.’
Run the script/F5…and then you’ll see your output.
There’s an Easier Way
Now this method is a wee bit more like brute force. I’ve talked about this before. You enable SERVEROUTPUT by default for every session you open in SQL Developer.
And I’ve talked more in depth about code templates before as well – besides Reports, maybe the least-utilized/most-powerful features in all of SQL Developer in terms of saving you time and making your life easier.