Xref: alice comp.databases.oracle.server:60822 comp.databases.oracle.tools:29814
Path: alice!news-feed.fnsi.net!netnews.com!dca1-hub1.news.digex.net!intermedia!cyclone.swbell.net!typhoon01.swbell.net.POSTED!not-for-mail
Message-ID: <37AD7F57.40D3@swbell.net>
From: Scott McKellar <mck9@swbell.net>
Reply-To: mck9@swbell.net
Organization: none
X-Mailer: Mozilla 3.01C-SBXA  (Win95; I)
MIME-Version: 1.0
Newsgroups: comp.databases.oracle.server,comp.databases.oracle.tools
Subject: Re: Q: DBMS_OUTPUT display while processing?
References: <7oif65$mbk$1@nnrp1.deja.com>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Lines: 28
Date: Sun, 08 Aug 1999 08:00:07 -0500
X-Complaints-To: abuse@swbell.net
X-Trace: typhoon01.swbell.net 934117237 207.193.20.72 (Sun, 08 Aug 1999 06:00:37 PDT)
NNTP-Posting-Date: Sun, 08 Aug 1999 06:00:37 PDT

ewong74@netscape.net wrote:
> 
> Hi,

[snip]

> I tried to have DBMS_OUTPUT.PUT_LINE in every single procedure to print
> out the status so that I can monitor each process(to see if there is
> errors) while the package is still running.  However, the DBMS_OUTPUT
> didn't display until the whole package is done.  This is very annoying.
> Is there any work around?

DBMS_OUTPUT doesn't display anything.  It just stores text in a 
buffer to be regurgitated later.  Sqlplus fetches the contents of the
buffer for you and displays it.

Within your own procedures you can fetch the text from the DBMS_OUTPUT
buffer and do whatever you want with it -- you can store it in a table
or write it to a file.  We use this approach to write debugging
messages to a file via the UTL_FILE package.

I'm afraid I don't remember how to fetch from the buffer -- I wrote it
once, buried it in a package, and forgot the details -- and I don't
have the manual handy at the moment.  However it wasn't hard to figure
it out from the manual.

Scott McKellar	mck9@swbell.net
http://home.swbell.net/mck9/pls/
