Forum Stats

  • 3,750,523 Users
  • 2,250,188 Discussions
  • 7,866,998 Comments

Discussions

Serveroutput size limited

Erik van Roon
Erik van Roon Member Posts: 58 Blue Ribbon
edited Jan 27, 2018 2:20AM in SQLcl

I see below behaviour in both 17.4.0.354.2224 and 17.3.0.256.1818

It seems sqlcl doesn't handle "set serveroutput size unlimited".

Or am I missing something?

Using 'unlimited' for size in the "set serveroutput" command is accepted without errors, but buffersize remains 1M.

Below script sets  serveroutput size to unlimited and then tries to output 1500 lines of 1000 characters, so 1.5M bytes (plus some for end-of-line).

set serveroutput on size unlimited format wrappedspool junkdeclare  c_line constant varchar2(1000) := rpad('x',1000,'x');begin  for i in 1 .. 1500  loop    dbms_output.put_line (c_line);  end loop;end;/spool off

in sqlplus the result is:

sqlplus.jpg

in sqlcl, however:

sqlcl.jpg

Best Answer

  • thatJeffSmith-Oracle
    thatJeffSmith-Oracle Distinguished Product Manager Posts: 7,906 Employee
    edited Jan 26, 2018 3:09PM Accepted Answer

    So you can work around this by adding this to your anon block - it gives you a true unlimited buffer output size

      DBMS_OUTPUT.ENABLE (buffer_size => NULL);

    Code has been changed for 18.1 - you'l get unlimited as far as your process memory will take you.

Answers