Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Default serveroutput

Re: Default serveroutput

From: Ewan Parker <ewan_at_chimera.u-net.com>
Date: 2000/07/29
Message-ID: <1289.245T2854T496001ewan@chimera.u-net.com>#1/1

On 28-Jul-00 16:05:34, Manjunath Aravind said about Default serveroutput:
> Whenever I start a SQLPlus session, the default value of
> serveroutput is OFF. How do I ensure that this default
> value is ON ? I don't want to do a 'set serveroutput on'
> everytime I start a session.

Put the line 'set serveroutput on' in your login.sql file in your SQLPATH. Be careful, as depending upon how you go about this, you may affect other users as well.

> Also, executing dbms_output.enable(10000) within my pl/sql code
> does NOT actually turn serverouput to ON for the current session.
> Is there any other way, that I can turn serverouput to ON for
> my session ?

If you envisage dbms_output.put_line adding text to a "queue", then this text can only be viewed by pulling it back off the queue again (FIFO). SQL*Plus only does this when serveroutput is set to on, in which case it prints the text on the terminal. The PL/SQL code itself has no facility to write to the terminal, only to the database. You could use dbms_output in your PL/SQL to grab the text in the queue and insert it into a table. SQL*Plus could then select from this table. Unfortunately, you cannot do specifically what you have asked.

HTH,
Ewan.

--
PGP footprint: 3A 82 19 D7 7A 61 D3 DC  4D F3 87 B2 27 99 BE 77
Received on Sat Jul 29 2000 - 00:00:00 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US