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: Triggers to Create Script Files.

Re: Triggers to Create Script Files.

From: Andrew Prosser <andrew_prosser_at_bigfoot.com>
Date: 1998/10/15
Message-ID: <908410288.13486.1.nnrp-04.9e9803d5@news.demon.co.uk>#1/1

How do you expect a trigger to fire if the first statement is for example, drop table. DDL is used for changing tables and triggers are invoked by DML, I suggest you rethink your strategy, unless you are just talking about data changes. If you are, what is the point to having an RDBMS if you want all your changes in external ascii files. If you do want this sort of redundancy, create a log table for every data table you have with a datetime column and an operator column. Every change to a table can be added to this table, ie;

I (inserted), date, row values
U(updated), date, row values
D(deleted), date, row values

It should be easy on a regular basis to extract a list ordered by date of what has been performed on a particular table.

Regards

--
Andrew Prosser

mravichandran_at_hotmail.com wrote in message
<70336k$9e9$1_at_nnrp1.dejanews.com>...

>Dear Netters,
>
>My objective is create a trigger attached to a table so that i get a script
>file when changes are made to the table. this script file should not be
>erased.. but should be appended when changes are made.
>
>I will deliver a table to my customer in January. after that i will be
>making changes to the table. the customer might be making an equal amount
of
>changes. 6 months later, i want to give only the changes to made to my
table
>to the customer or share some changes made by the customer.
>
>So, if i can write a trigger that will write out the changes in the follow
>format to an ASCII file:
>
>INSERT into TABLENAME (...);
>
>DELETE from ....
>
>your thoughts will be greatly appreciated.
>
>you can reach me at ravimahalingam_at_pmsc.com.
>
>with regards
>Ravi.
>
>-----------== Posted via Deja News, The Discussion Network ==----------
>http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
Received on Thu Oct 15 1998 - 00:00:00 CDT

Original text of this message

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