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: Q:Debug Trigger or where dbms_output.putline

Re: Q:Debug Trigger or where dbms_output.putline

From: Daniel Morgan <damorgan_at_exxesolutions.com>
Date: Fri, 30 May 2003 16:05:15 -0700
Message-ID: <3ED7E3AA.28F3489D@exxesolutions.com>


Karsten Farrell wrote:

> ralf.bender_at_arcor.de said...
> >
> > Hi
> >
> > is there someone who can tell a good way to debug a trigger? And how or
> > where can I select the last informations from writing with
> > dbms_output.putline?
> >
> > Thx for helping
> >
> When I debug a trigger, I usually create a transient "debug" table
> (don't want to say it's a "temporary" table because that conjures up all
> kinds of false ideas). The table has the columns I'm interested in plus
> a text field (say varchar2(100)) where I can put debug text. Add an
> appropriate INSERT statement in the trigger to populate my debug table,
> then sit back and wait for the trigger to fire several times. Then query
> the debug table from sqlplus. When I've figured out what's wrong, take
> the debug stuff out of the trigger and drop the debug table.
>
> This is, for me at least, easier than trying to coax debugging info out
> of dbms_output.put_line statements (especially since put_line "display
> lines" are limited to 255 chars). And everything stays on the server, so
> I don't have to have a session open while the trigger is filling my
> table.
> --
> /Karsten
> DBA > retired > DBA

I do the same. I think dbms_output is over-rated, over-used, and often to the detriment of the production environment never removed when code moves on from development. About the only time I use dbms_output is for student demos and even then only when I am making a very simple point.

--
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 Fri May 30 2003 - 18:05:15 CDT

Original text of this message

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