Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: DBMS_JOB and DBMS_OUTPUT question
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