Subject Re: [firebird-support] Object is in use?
Author Kjell Rilbe
Milan Babuskov wrote:

> Kjell Rilbe wrote:
> >> > When trying to drop a table I now and then get "Object XXX is in use"
> >> > when trying to commit. This is with FB WI-V2.1.0.17798.
> >> >
> >> > The only way I've found to resolve it is to disconnect and try again.
> >>
> >> What tool do you use when trying to drop a table?
> >> Do you have any simultaneous connections accessing that table?
> >
> > Tool = FlameRobin Unicode Windows
> > This is a snapshot build.
> >
> > No other activity on the database at all. This is on a test/development
> > machine and the only thing I run against the DB is FlameRobin and an ASP
> > (not ASP.Net) application that connects via ADO + ODBC. At the time,
> > there were no activity in the ASP application, although there were
> > active sessions. All DB activity in the ASP app happens during
> > server-side ASP script execution, and so, connects only when executing a
> > new ASP page/script, then disconnects.
> Maybe you could query the monitoring tables when the problem appears and
> see what might be 'using' the object?

What am I looking for?

It just happened now, and this is what I see:

One single attachment which is to the DB in question, state=1,
garbage_collection=1, STAT_ID=2.


A single row, referring to the DB in question. OLDEST_TRANSACTION=34111,

14 records each. Not sure what's relevant here if anything. Please advice.

11 records. All have TRANSACTION_ID=null except one, which has
TRANSACTION_ID=34112. This is the transaction I'm using to query the
MON$... tables. Anything I should look for here? Please advice.

A single record. TRANSACTION_ID=34112, STATE=1, ISOLATION_MODE=1, STAT_ID=3.

No trace of anything locking anything as far as I can see. Yet I can't
drop the table. Rollback the MON$... transaction and making sure all
other query windows in FR are rolled back or committed, and trying
again. Same result.

Taking a copy of the DB in this state for future ref, in case it's
possible to analyze it further.

Disconnect/reconnect FR. Now it works.

So, what's this all about really?

Kjell Rilbe
E-post: kjell@...
Telefon: 08-761 06 55
Mobil: 0733-44 24 64