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: Where is line 21? ++ USER_TRIGGERS vs USER_SOURCE

Re: Where is line 21? ++ USER_TRIGGERS vs USER_SOURCE

From: Niall Litchfield <niall.litchfield_at_dial.pipex.com>
Date: 16 Nov 2004 01:14:50 -0800
Message-ID: <1100596490.115349.50830@c13g2000cwb.googlegroups.com>


DA Morgan wrote:
> Mark C. Stock wrote:
>
> > "Niall Litchfield" <niall.litchfield_at_dial.pipex.com> wrote in
message
> > news:1100511110.358057.263800_at_c13g2000cwb.googlegroups.com...
> > | DA Morgan wrote:
> > | > Ramon F Herrera wrote:
> > | >
> > | > > Hello:
> > | > >
> > | > > I keep on getting error messages like the following:
> > | > >
> > | > > ------------------
> > | > > Record 7: Rejected - Error on table SHAWS.
> > | > > ORA-00001: unique constraint (DATABASE.CACHE) violated
> > | > > ORA-06512: at "DATABASE.SYNCSHAWS", line 21
> > | > > ORA-04088: error during execution of trigger
'DATABASE.SYNCSHAWS'
> > | > > -------------------

<snip>

>
> And not to rub it in ... Oracle does not report errors where
> they first originate but often later on in the code.

This is of course true, I can't believe however that you don't start by looking at the reported error and then tracing the problem back.

In this case I'd be looking at line 21 of the trigger DATABASE.SYNCSHAWS (terrible name for a schema by the way), seeing what that contained, tracking it back to the offending insert statement and looking at the data from record 7 and the existing state of the table SHAWS. I wouldn't just print out my text file and gaze at it waiting for inspiration. I also wouldn'ty assume that the code contained in the version of the text file I had found on disk was the same as the code being executed by the RDBMS.

Mark's comment about my query being invalid prior to 9i is perfectly correct, but I'm having a hard time understanding where you would start except line 21 of the trigger code.
Niall Litchfield
Oracle DBA
http://www.niall.litchfield.dial.pipex.com Received on Tue Nov 16 2004 - 03:14:50 CST

Original text of this message

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