-
Hi,
Is it possible to log the output of dbms_output.put_line() to a file?
-
You can use UTL_FILE package to write the messages to a file.
skid
-
sure, use the spool command.
Jeff Hunter
-
Hi,
Can u plz give me an example of how to use it..
I am new to Oracle db
Originally posted by skid
You can use UTL_FILE package to write the messages to a file.
skid
-
Hi
set echo off
set feedback off
set verify off
set heading off
spool test.txt
declare
begin
dbms_output.put_line('hello');
end;
now do cat text.txt
regards
Hrishy
-
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.
[Edited by ales on 04-29-2002 at 07:11 AM]
-
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.
Serge.
-
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.
[Edited by ales on 04-29-2002 at 07:11 AM]
-
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".
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|