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: DBMS_JOB and DBMS_OUTPUT question

Re: DBMS_JOB and DBMS_OUTPUT question

From: Daniel Morgan <damorgan_at_exxesolutions.com>
Date: Thu, 07 Aug 2003 12:40:44 -0700
Message-ID: <3F32AB3B.DFE5A6C8@exxesolutions.com>


Mike wrote:

> I have a stored procedure which will run every day via a job created
> using the dbms_job package. Within the procedure, I have various
> dbms_output statements meant to print out various little messages
> incase the procedure is run by someone from sql*plus or whatever.
>
> Will this affect how the procedure is run via the scheduled job? It
> won't produce an error? My thinking is that it will just ignore the
> dbms_output stuff since there is no one to output it to.
>
> I am a complete newbie to oracle, so any advice is appreciated.
>
> Mike

It won't hurt a thing other than, perhaps, performance ... but it is a really bad idea. Those messages aren't going anywhere. Anyone watching, and there won't be anyone, would need to type SET SERVEROUTPUT ON to see a thing: And they won't.

Replace the DBMS_OUTPUT calls with inserts into a log table. DBMS_OUTPUT should never exist in production code.

--
Daniel Morgan
http://www.outreach.washington.edu/extinfo/certprog/oad/oad_crs.asp
damorgan_at_x.washington.edu
(replace 'x' with a 'u' to reply)
Received on Thu Aug 07 2003 - 14:40:44 CDT

Original text of this message

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