Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: SERVEROUTPUT Status
On Tue, 10 Feb 2004, syltremzulu_at_videotron.ca wrote:
> Hi Daniel
>
> Why do you (and others before) say that DBMS_OUTPUT does not
> belong to production code?
>
> I have PL/SQL blocks that are executed in batch mode (for daily
> update etc) and I output messages like:
>
> 6576 rows updated
> 8765 rows inserted
>
> at the end of the run so that when I look at the log file I
> know it did what I expected it to do. If it runs and no message
> is printed, how do I know for sure that it actually did
> something? Of course, I could output those to a table (I do
> for some jobs that run using DBMS_JOB) but for those running in
> the batch queue (this is OpenVMS, a little bit like a CRON on
> Un*x) I prefer having the log file. Again, this is a concept
> (log files for batch jobs) that does not exist on Windoze.
>
> So if you feel I should not, ever, use it, can you explain why?
In our code, we have an error/logging package which we call for all messages and notifications. Within this package we log to persistent stores, but we also will inform to the screen with dbms_output on failures.
The issue with dbms_output is that it can fail your job because dbms_output will fail by itself with line length overflows.
I think judicious usage for command-line notification is fine.
-- Galen BoyerReceived on Tue Feb 10 2004 - 21:21:38 CST
![]() |
![]() |