dbms_output.put + dbms_output.newline

Kiryl

Member
Hi,

I tried writing to buffer (dbms_output.put)and then putting line (dbms_output.put_line). It writes output until a certain point and then stops (after maybe 500 characters or so). To me the problem is in buffer size. In preferences it is set to 100000. I tried dbms_output.enable(buffer_size=>null) to set it to unlimited - didn't work either.

Can anybody help, please. Thanks.
 
Sorry, I meant to say:

"I tried writing to buffer using dbms_output.put() and then putting line using dbms_output.new_line().
 
There are problems with long lines, but I've never faced them with dbms_output. Maybe you could use utl_file instead. With utl_file you can use fflush, so you'll be able to write as much as you want.
 
There is a maximum limit depending on the oracle version. You can create a procedure to handle the output like that:

PROCEDURE put_line(p_string_in IN VARCHAR2) IS
BEGIN
dbms_output.put_line(p_string_in);
EXCEPTION
WHEN OTHERS THEN
dbms_output.enable(1000000);
dbms_output.put_line(p_string_in);
END;
 
Back
Top