Toad World® Forums

DBMS_ouput.put_line


#1

Does the DBMS_output.put_line logs the lines to be displayed in a file which can be accessed later?

Thanks.


#2

DBMS_OUTPUT is an oracle supplied package that simply collects and then outputs to the screen buffer. Again, this is an Oracle feature that toad merely exposes/leverages. So it has to work the way Oracle defined - which is no, does not write to a file. Could toad be made to add this extra capability - maybe. So suggest you add this idea to the toad idea pond and see if people vote on it …


#3

Just one addition to Bert answer…

If you put in Toad:

set serveroutput on size unlimited;
spool c:\some_filename
begin
dbms_output.put_line(‘this si dbms output text’);
end;
spoo off

And run as script (F5) then if you look in created file in c:…content is:
this si dbms output text
PL/SQL procedure successfully completed.

And this is just what you are looking for.

Brg

Damir


#4

Thanks all for your responses. The response from damir.vadas_531 is a sure help. Thank you Damir.


#5

If you want to supress “PL/SQL procedure successfully completed.” in file

then place

SET FEEDBACK OFF

i.e.

SET FEEDBACK OFF

spool c:\some_filename


#6

I also recommend that spooling to file include set trimout on and set trimspool on - will keep file sizes far more reasonable :slight_smile:


#7

Valuable tips! Thank you again!