RE: Sending feed back to sqlplus user

  • From: Tanel Poder <tanel.poder.003@xxxxxxx>
  • To: salem.ghassan@xxxxxxxxx, BSpears@xxxxxxxxxxxxxxxxx
  • Date: Sat, 26 Aug 2006 17:14:54 +0800

Btw, 
 
you could also use dbms_output.get_lines to fetch the rows into sqlplus
variables and print them. 
This is what sqlplus is doing after executing each pl/sql block when
serveroutput is on - executing dbms_output.get_lines and displaying their
return values...
 
But you would need to put this into all your clients (g)login.sql as well,
thus it's not much different from the solution suggested below by Ghassan..
 
Tanel.


  _____  


SQL> begin
  2  dbms_output.enable(10000);
  3  dbms_output.put_line('test before');
  4  end;
  5  /

PL/SQL procedure successfully completed.

SQL> set serverout on size 10000
SQL> begin null; end; 
  2  /
test before

PL/SQL procedure successfully completed.


so 'set server...' does not clear the buffer if already set before, so for
sql*plus,
you can change your glogin.sql to insert
set serveroutpout on size ..... 
begin 
null; 
end;
/



Other related posts: