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: Oracle stored procedures vs Running from a flat .sql file

Re: Oracle stored procedures vs Running from a flat .sql file

From: Alex Filonov <afilonov_at_yahoo.com>
Date: 8 Jan 2003 13:43:42 -0800
Message-ID: <336da121.0301081343.427ea315@posting.google.com>


Martin Doherty <martin.doherty_at_nospam.com> wrote in message news:<xRKS9.16$2c1.184_at_news.oracle.com>...
> Alex Filonov wrote:
>
> >[snip]
> >
> >However, in most cases you need to modify stored objects in order to
> >debug.
> >
> That's often because the people who code the stored procedures generally
> do not prepare well for the inevitable debugging phase. I saw a lovely
> technique in a Feuerstein book where each package contained calls to a
> debugging procedure at strategic points in the logic. This debugging
> procedure (either contained within the same package or preferably
> centralized for use by all code) would check a package global flag and,
> if true, would call dbms_output.put_line with the supplied string (plus
> any other standard context info desired). If you are having problems
> with a package, you can simply fire up SQL*Plus, set the debugging flag
> to true, execute the procedure and analyse the output. The nice thing is
> that the messages contain the knowledge imprint of the original code
> designer, and may supply far more insight into what's going on than you
> or me trying to retrofit meaningful debug messages after the fact (which
> might still be necessary).
>
> Considering the relative percentages of time spent writing new code vs.
> time later spent maintaining that code over its life, it pains me when
> simple defensive programming techniques are given such low priority by
> developers and managers in their rush to build and meet the upcoming due
> date.
>

The biggest problem here is that people writing software and people maintaining it are usually different people. More to the point, in current environment, in USA at least, developers are usually not working for the company anymore when some problem arises and there is a need for debugging. And, of course, development budgets are cut to the bone, so main developer's headache is to make damn thing work, pity to the future support.

> Martin Doherty
Received on Wed Jan 08 2003 - 15:43:42 CST

Original text of this message

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