So the Command window in PSD emulates SQL*Plus really well. I only have to bring up SQL*Plus maybe twice a year now. However, there seems to be a bug in how PSD emulates the SET SERVEROUTPUT ON and SIZE command.
On 9i, I got in the habit of always specifying the size of the buffer: SET SERVEROUTPUT ON SIZE 1000000
10g removed some limitations and now has an UNLIMITED setting. And the Oracle docs indicate that if you don't specify the SERVEROUTPUT size, the default is UNLIMITED.
Unfortunately, this is client-dependent. When I issue the following two tests in SQL*Plus, it works as expected. But in PSD, both the default and explicit setting of UNLIMITED seem to be ignored and the output buffer is limited to 2000 chars. In case you are wondering, in my preferences the Output pane shows the buffer to be set to 1000000 chars, so that seems to be ignored as well.
SET SERVEROUTPUT ON
begin
for i in 1 .. 100000 loop
dbms_output.put_line('xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx');
end loop;
end;
/
SET SERVEROUTPUT OFF
SET SERVEROUTPUT ON SIZE UNLIMITED
begin
for i in 1 .. 100000 loop
dbms_output.put_line('xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx');
end loop;
end;
/
For both of the above, I get the following error in PSD 8.0.3:
ORA-20000: ORU-10027: buffer overflow, limit of 2000 bytes
bc