Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: SERVEROUTPUT Status
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?
Thanks
-- Syltrem OpenVMS 7.3-1 + Oracle 8.1.7.4 http://pages.infinit.net/syltrem (OpenVMS related web site, en français) ---zulu is not in my email address--- "Daniel Morgan" <damorgan_at_x.washington.edu> a écrit dans le message de news:1076371489.558633_at_yasure...Received on Tue Feb 10 2004 - 09:38:11 CST
> ben p wrote:
>
> > Hello there,
> > does anybody know a way I can check the value of serveroutput from
> > within a block ? In sqlplus you can do 'show serveroutput' but i cant
> > find a way of getting this info in some plsql. Im trying to write a
> > function to work out if serveroutput is on / off.
> > Cheers
> > Ben
>
> You shouldn't want to see it within a block. DBMS_OUTPUT does not belong
> in production code: Ever!
>
> If you want to know the value of a variable ... insert it into a table.
>
> --
> Daniel Morgan
> http://www.outreach.washington.edu/ext/certificates/oad/oad_crs.asp
> http://www.outreach.washington.edu/ext/certificates/aoa/aoa_crs.asp
> damorgan_at_x.washington.edu
> (replace 'x' with a 'u' to reply)
>
![]() |
![]() |