Subject Re: [ib-support] How to test a sequence then rollback?
Author Helen Borrie
At 02:06 PM 28-08-02 +1000, you wrote:
>I want to test a sequence of scripts, adding fields, giving them values
>and so,
>and then roll back, so that I can test the scripts until they all work,
>and then
>use them in earnest on the production database. I do
>Transcation.StartTransaction, call all the scritps and then
>But at first I was getting errors trying to put values into the new field.
>I put CommitRetaining, but that means that the field is still there after the
>rollback. What's the trick?

No trick of this ilk that could possibly succeed. All metadata must be
committed before it exists.You can't do CommitRetaining on DDL; and you
can't perform DML involving metadata objects that don't exist.

Create a testbed which is a copy of the current structure. Keep another
copy on standby for recopying.

Create the metadata first in a testbed, committing as you go.

Add the test data and commit them.

Then iteratively test-alter-retest, updating scripts to reflect further

When you're happy, apply the script to the production database with the
database in a shutdown state.