“Object Is in Use” Error - Firebird

It is worth mentioning this exception in the context of applying referential integrity constraints, since it is a regular source of frustration for new users. Firebird will not allow a referential constraint to be added or dropped if a transaction is using either of the participating tables.

Sometimes it may be less than obvious to you just in what way the object is in use. Other dependencies —such as stored procedures or triggers that refer to your tables, or other referential constraints affecting one or both—can cause this exception to occur if they are in use by an uncommitted transaction. Metadata caches (blocks of server memory that hold metadata used to compile recent client requests and any recently used stored procedure and trigger code) keep locks on the objects in their possession. Each connection has its own metadata cache, even on a Superserver, so the server could be holding locks on objects that no connection is actually using.

It is highly recommended that you get exclusive access to the database for any metadata changes, particularly those involving dependencies.

All rights reserved © 2020 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

Firebird Topics