Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: TRIGGER-Name of the current table

Re: TRIGGER-Name of the current table

From: Martin T. <bilbothebagginsbab5_at_freenet.de>
Date: 5 Oct 2006 08:45:34 -0700
Message-ID: <1160063134.156112.295210@i3g2000cwc.googlegroups.com>


Taras wrote:
> Thanx for your answer, Martin,
>
> The main goal is to pass the original (old) record to a procedure,
> which would then concatinate all the values from this record an store
> them into a logging table. (i wanted to use that table name to retrieve
> rowtype later)
>
> I would like to have only one procedure, which would log records from
> many different tables.
> (perhaps i would pass them as ref cursor, i'm not sure yet how to do
> it, since i'm a beginner)
>
> The reason is that if we would decide to change the logging mechanism
> later, we would have to change only that procedure instead of 50
> triggers accross the schema.
>
> Also i would like to have this universal code, to add it to any new
> tables without serious modifications (because our database structure
> tends to change often)
>
> Regards, Taras
>

I will not argue with Robbert about using another method like Jornaling Table or the like - don't know what's out there, but IF there is something out-of-the-box out there I agree that you should probably use it :-)

But I was thinking for your specific case ... I doesn't make much difference if you have to
a) CREATE TRIGGER ON TABLE X (...) MY_LOGGING_FUNC(:NEW) or if you do
b) CREATE TRIGGER ON TABLE X (...) MY_LOGGING_FUNC('X', :NEW) ... or does it?
And of course we are back at the code-generating script with either (a) or (b) in my opinion.

cheers,
Martin Received on Thu Oct 05 2006 - 10:45:34 CDT

Original text of this message

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