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: Help on error logging strategies from triggers

Re: Help on error logging strategies from triggers

From: <andreas.prusch_at_sintec.de>
Date: Wed, 15 Jul 1998 09:02:27 GMT
Message-ID: <6ohr72$r89$1@nnrp1.dejanews.com>


You can use dbms_pipe package to send messages from triggers to another session. In the other session you have to use dbms_pipe to receive this messages and insert them into a table with normal commit.

Hope this will help.
Andreas Prusch

In article <01bdaf76$a2ebb540$bb0a552f_at_nt-02188.europe.nortel.com>,   "Liam Caffrey" <Liam.dot.Caffrey.dot.caffreyl_at_nortel.dot.ie> wrote:
> I want to log on a database table error situations that originate from
> triggers. The triggers happen to be data transforming triggers located on a
> replicated target table.
>
> ROLLBACK and/or COMMIT is not possible from inside triggers, or procedures
> called from triggers.
> If the exception is unhandled everything rolls back implicitly.
> If the exception is handled, everything commits implicitly. However in this
> case, I want the DML that fired the trigger to fail and the 'insert into
> dblog' to succeed. (i.e. the replication transaction will stay in the queue
> (or error queue) and can be flushed forward again). Unfortunately the
> replication error log is too technical to offer to the application user.
> Is there a way around this while still inserting error info to a database
> table.
>
> DBMS_OUTPUT.PUT_LINE output goes to Nirvana when, say, rep_admin runs the
> trigger. Or does it.....?
>
> I suppose I could use UTL_FILE. This seems a bit fiddly trying to
> synchronise cron reads and oracle writes.
>
> Or maybe write the error message to a persistent PL/SQL table - but
> how/when would I flush it to the database. On a time basis maybe - again,
> synchronisation problems.
>
> Is there any other strategy that somebody has used? I would appreciate any
> pointers. I haven't managed anything along the RTFM lines yet.
>
> Regards
>
> Liam Caffrey
> (please remove the no-spam if replying)
>
>

-----== Posted via Deja News, The Leader in Internet Discussion ==----- http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum Received on Wed Jul 15 1998 - 04:02:27 CDT

Original text of this message

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