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: Generate undo information

Re: Generate undo information

From: DA Morgan <damorgan_at_exxesolutions.com>
Date: Mon, 17 Mar 2003 08:41:25 -0800
Message-ID: <3E75FAB5.528A7E5A@exxesolutions.com>


Nick Wagner wrote:

> We want to generate "undo information" for DML-Statements by our own and
> store the data somewhere (e.g. in a table).
>
> Background: During a software deployment we have to insert/update records in
> the database. The requirement is, that an undo of the software deployment
> can happen in a later stage (database changes already commited).
> Therefore all information to undo database changes have to be stored. These
> information should be generated, not coded by a developer.
> Is there anything that gives me the corresponding undo statement for a DML?
>
> How can we do this, any advises?
>
> Thanks in advance, Nick

The thought of doing this on a production system goes against every rule I can think of about what goes on in production. This should be done in testing with a clone of your production database.

But given your desire to do this ... and the fact that you can't use LOGMNR how about an AFTER INSERT/UPDATE/DELETE trigger on the tables and use it to write out an undo with a single sequence to record the ordering of the transactions.

And if my suggestion looks bad ... it is. I wouldn't do it myself.

Daniel Morgan Received on Mon Mar 17 2003 - 10:41:25 CST

Original text of this message

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