Subject Re: [firebird-support] Adding a field with NOT NULL constraint
Author Aldo Caruso
Helen,

    Thank you very much for you advices.

    As a matter of fact, I had been changing table structures and
stored procedures while other clients were connected since many years
with no problems. Nevertheless, what you say is indeed true and can give
rise potentially to trouble.

    Better to disconnect clients ( during for a low activity hours )
before applying DDL statements.

    Thanks.

Aldo Caruso


El 10/02/18 a las 17:32, Helen Borrie helebor@...
[firebird-support] escribió:
>>   Your last advice concerns me a bit. Is it also valid for
>> changing stored procedures or triggers ?
> As an abiding principle - yes. But, for SPs and triggers, the effect
> varies according to a few factors. The BLR for these modules is
> cached on first use. Changes conducted whilst the module is in cache
> will not take effect until the cached copy is removed.
>
> For Classic and Superclassic, each user has a private cache that
> disappears when that user detaches from the database. For
> Superserver, the cache is shared, so the changes will not take effect
> for any user until all users detach.
>>   Should I have always to disconnect every client before executing DDL sentences ?
> My advice is "Yes, always". There might be some conditions where
> changing things while users are online is plain sailing but how would
> you know for certain? Whilst the engine may allow you to effect
> changes without throwing errors or corrupting on-disk structures, it
> would be difficult to assure yourself that you are not going to
> corrupt the in-memory structures that users already have in place.
>
> And, when all is said and done, assumptions about the structure of
> the database objects are made in the client application and any active
> request refers to the status quo when that client connected.
>
> HB
>
>
>
>
> ------------------------------------
>
> ------------------------------------
>
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>
> Visit http://www.firebirdsql.org and click the Documentation item
> on the main (top) menu. Try FAQ and other links from the left-side menu there.
>
> Also search the knowledgebases at http://www.ibphoenix.com/resources/documents/
>
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
> ------------------------------------
>
> Yahoo Groups Links
>
>
>