Subject | Re: [firebird-support] Applying DDL sentences while others online. |
---|---|
Author | unordained |
Post date | 2011-07-06T20:22:53Z |
---------- Original Message -----------
From: Aldo Caruso <aldo.caruso@...>
Advisable, perhaps, but not strictly necessary; Firebird will generally give you
"object is in use" errors if you forget to do so, and prevent/rollback the
changes.
The nastier problem with modifying procedures/triggers at runtime is that
metadata is cached, and the caches in each Classic instance don't get updated
instantly. (This is less of a problem with SuperServer.) So you may change a
procedure/trigger, but still see the old version of the code running in some
existing connections for a while after that, which can be horribly confusing. If
the change is critical (business rules, security), kicking everyone out is
advisable. Adding constraints works fine at runtime, AFAIK, though I haven't
specifically tested CHECK constraints to see how well that works. Adding a PK/FK/
Unique either works, or gives you "object is in use", but I've never seen it
silently allow invalid data. Changing the domain of a field ... is probably
similar to CHECK constraints, whatever the situation is there?
That's my experience.
-Philip
From: Aldo Caruso <aldo.caruso@...>
> [snip] For------- End of Original Message -------
> other kind of DML ( like deleting fields, setting new referential
> integrity constraints, modifying a stored procedure or a trigger, etc.
> ) I would be more conservative and shut down the database previously.
Advisable, perhaps, but not strictly necessary; Firebird will generally give you
"object is in use" errors if you forget to do so, and prevent/rollback the
changes.
The nastier problem with modifying procedures/triggers at runtime is that
metadata is cached, and the caches in each Classic instance don't get updated
instantly. (This is less of a problem with SuperServer.) So you may change a
procedure/trigger, but still see the old version of the code running in some
existing connections for a while after that, which can be horribly confusing. If
the change is critical (business rules, security), kicking everyone out is
advisable. Adding constraints works fine at runtime, AFAIK, though I haven't
specifically tested CHECK constraints to see how well that works. Adding a PK/FK/
Unique either works, or gives you "object is in use", but I've never seen it
silently allow invalid data. Changing the domain of a field ... is probably
similar to CHECK constraints, whatever the situation is there?
That's my experience.
-Philip