Subject Re: [ib-support] Add FK Constraint fails with "... object .. is in use"
Author Ann W. Harrison
At 05:38 PM 7/9/2002 -0400, Bill Meaney wrote:

>While running this script in 5.6 we get an error. This error happens quite
>frequently but not always, when we try to add a FK constraint.
>unsuccessful metadata update
>object GPCSET is in use

Foreign keys must be recognized and respected as soon
as they are created, just as indexes are. For indexes,
a special page called the root page is used to notify
all processes that have an interest in the table that
an index has been added. Because foreign keys do not
have a similar mechanism, the locking requirements to
create them are quite restrictive. My suggestion is that
you create tables, detach, reattach, then create foreign
key constraints.


We have answers.