Subject Re: Metadata update
Author Carlos Macao
--- In, Svein Erling Tysvær
<svein.erling.tysvaer@k...> wrote:
> --- In, "Carlos Macao" wrote:
>> I was trying to build an automated application install which
>> among other tasks tries to update DB metadata with a bunch of
>> scripts with a unique and final commit or rollback conditioned by
>> the install success. Is there any way to achieve that with this
>> Firebird limitation?

> I doubt it, but does that really matter? I suppose it could do if
> you added something to an existing table whilst people were
> updating it, but you should anyway be very careful about doing DDL
> (data definition) on a database when others do DML (manipulate
> data) simultaneously.

I already impose that rule; I only start the installation process
after checking if no one is connected and to lock a flag field on
that DB which prevents future connections from other clients, while
the installation is on progress.

> For rollback? Well, you've already got your create/alter
> statements, so it shouldn't be too difficult to change hings back
> to the original state - simply by analyzing what you've done.
> Though I admit it is a bit more complicated than a simple rollback.
> Set

Thanks for yours and David replies but as I have exclusive access to
the DB being updated, I prefer to backup/restore instead of rolling
back the changes in that way, which is a little more complicated for
large modifications. Any way it's a pity that I can't simply
commit/rollback a batch metadata update...

Carlos Macao