SQL Developer's DBMS Output Panel: Enable-Per-Connection Traps and Buffer Limits
The DBMS Output tab in SQL Developer is disabled by default per connection and fetches buffered lines only after execution. Learn how session scoping, buffer limits, and version differences affect PL/SQL debugging.
11 Oct 2025, 01:12 UTC

The Blank Panel Problem
You run a PL/SQL block that calls DBMS_OUTPUT.PUT_LINE, the script finishes without error, and the DBMS Output tab shows nothing. The database executed the code, but the panel is empty. This is usually not a driver bug or a database fault; it is the panel's enable-per-connection and post-execution polling model behaving as designed.
Why the Panel Starts Empty
SQL Developer disables the DBMS Output tab for every new connection. Before any buffered text appears, you must click Enable DBMS Output in that tab. That click sends a session-level DBMS_OUTPUT.ENABLE call with a client-side buffer size. Because the setting is tied to the session, reconnecting, opening a new unshared worksheet, or losing the connection discards any unread lines and leaves the panel disabled again.
Even if a script includes SET SERVEROUTPUT ON, the DBMS Output panel remains a separate client-side toggle that must be re-enabled per connection. SQL*Plus and SQL Developer manage output independently.
Buffering, Timing, and ORA-20000
Output is not streamed live while a block runs. SQL Developer typically fetches the buffered lines after the statement completes or when you manually refresh the tab. A long loop can appear frozen for minutes, then populate instantly when execution ends.
The buffer itself has limits. Historically, the panel defaulted to 20,000 bytes, though the exact default and maximum have varied across SQL Developer and database releases. If a block writes more than the enabled buffer, the database can raise ORA-20000 or silently truncate the output. An unhandled exception before DBMS_OUTPUT.ENABLE can also leave the panel empty.
Worked example: explicit buffer control
Run the following in a SQL Developer worksheet connected to your target schema. No special privileges are required beyond the ability to execute PL/SQL in that schema.
BEGIN
DBMS_OUTPUT.ENABLE(1000000); -- 1 MB explicit buffer
FOR i IN 1..5000 LOOP
DBMS_OUTPUT.PUT_LINE('Iteration ' || i);
END LOOP;
END;
/
Expected check: After the block finishes, switch to the DBMS Output tab. If the tab was not enabled before execution, it will remain blank even though the loop ran. If you see ORA-20000, the buffer was too small for the payload.
Risk: Large or unlimited buffers consume session memory. DBMS_OUTPUT.ENABLE(NULL) removes the size limit, but in memory-constrained sessions it can increase pressure or fail. Use explicit sizes when testing loops that produce thousands of lines.
Diagnostic decisions when output is missing
| Symptom | Likely cause | Action |
|---|---|---|
| Blank panel, no error | Panel not enabled for this connection | Click Enable DBMS Output before running |
| Blank after reconnect | Session-scoped buffer discarded | Re-enable and re-run the block |
| ORA-20000 | Buffer overflow | Enable with a larger size or NULL |
| Output truncated | Buffer limit reached silently | Compare line count to enabled buffer size |
Limitations and version sensitivity
The panel is a debugging convenience, not a logging mechanism. It does not persist messages, does not capture output from other sessions, and should not replace a logging table or framework. Because DBMS_OUTPUT is session-scoped and non-transactional, a rollback or disconnect loses unread lines.
UI labels, default buffer sizes, and polling intervals vary across SQL Developer versions. Older tutorials and screenshots may not match your installation. Consult the Help or release notes for your specific version to confirm the default buffer size and tab location.
Actionable closing
- Enable the DBMS Output tab explicitly for each connection before running PL/SQL.
- For large debugging payloads, call
DBMS_OUTPUT.ENABLEwith a known size inside the block rather than relying on the panel default. - Assume buffered output is lost on reconnect; capture critical diagnostics in a logging table if they must survive session termination.
- Verify the setup with a single
DBMS_OUTPUT.PUT_LINEcall before running complex loops.
0 replies
A thoughtful contribution can make all the difference. Be the first to share one.