Oracle: Output not shown even if SERVEROUTPUT variable set to ON I was wondering why the output is not being shown even if I set the SERVEROUPUT variable to ON.

I have the following annonymous block code: 

DECLARE
    v_rec_count number:=0;
BEGIN
    for rec in (SELECT T_A.ROWID, T_A.OPEN_COUNT, T_B.OPEN_COUNT as NEW_OPEN_COUNT
            FROM T_A
            INNER JOIN T_B ON
                T_A.KEYA = T_B.KEYA
            AND T_A.KEYB = T_B.KEYB
            AND T_A.OPEN_COUNT &lt;&gt; T_B.OPEN_COUNT) 
    loop
        v_rec_count := v_rec_count + 1;

        update T_A t1
        set t1.OPEN_COUNT = rec.NEW_OPEN_COUNT,
            t1.UPD_USER_ID = 'batch',
            t1.UPD_DATE = SYSDATE
        where t1.rowid = rec.rowid;
    end loop;

    dbms_output.put_line ('T_A UPDATE_TOTAL: ' || v_rec_count);
END;
/


When I execute the following code, I would like to see the output of dbms_output.put_line to the sql prompt and eventually to the log file when I run the sql file via sqlplus. The output that the block does is just the "PL/SQL Procedure has successfully run".

I already set SET SERVEROUPUT ON before the block but it does not work. Any ideas?
As you can see from the output below, a test anonymous PL/SQL block works in SQL Plus as expected:

[oracle@node1 ~]$ sqlplus phil/phil

SQL*Plus: Release 11.2.0.2.0 Production on Mon Oct 1 21:55:35 2012

Copyright (c) 1982, 2010, Oracle.  All rights reserved.

Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL&gt; set serveroutput on
SQL&gt; DECLARE
  2      v_rec_count number;
  3  BEGIN
  4      select count(*) into v_rec_count from dual;
  5      dbms_output.put_line ('count: ' || v_rec_count);
  6  END;
  7  /
count: 1

PL/SQL procedure successfully completed.

SQL&gt;


I'd guess that you're not using SQL Plus to test &amp; are testing in another tool (such as SQL Developer) and it's not set DBMS_OUTPUT.enable() or you haven't configured the tool to correctly display the output from the RDBMS.

Or, it could be the fact that SET SERVEROUPUT ON is a typo :)