set echo off
set feedback off
set verify off
set heading off set serveroutput on size 65536
spool test.txt
begin
dbms_output.put_line('hello');
end; /
spool off
now do cat test.txt
... if you're on unix. If you're on Win use notepad or your favourite text editor.
Thanks Buddy. Gave me the answer I needed. It was obvious to put the set serveroutput on ... But only after reading your post. Save me a lot of time. Thanks again.
Hi,
I executed what u mentioned but...this is what I got in test.txt
SQL> declare
2 begin
3 dbms_output.put_line('hello');
4 end;
5 /
hello
SQL> spool off
I want just the output of dbms_output.put_line to be captured in the file..in this case 'hello'
Hope u will help me..
....
Originally posted by ales set echo off
set feedback off
set verify off
set heading off set serveroutput on size 65536
spool test.txt
begin
dbms_output.put_line('hello');
end; /
spool off
now do cat test.txt
... if you're on unix. If you're on Win use notepad or your favourite text editor.
If you write the commands interactively you see them always in the output file. Put the commands in a file (test.sql) and then call it either with "start test" or "@test".
If you don't want to see the output on the screen add "set termout off".
Bookmarks