Subject Re: Can't delete closed database
Author Adam
--- In firebird-support@yahoogroups.com, Richard Wesley <hawkfish@...>
wrote:
>
> I have a test suite which creates a database (using the embedded
> server), adds some tables and data, indexes some columns (some of
> which fail and are rolled back), closes the connection and tries to
> delete the database with isc_drop_database.
>
> The drop fails with the following message:
>
> 14:47:44.195: --- FB Error
> ---------------------------------------------------------------
> 14:47:44.195: Status: 335544351
> 14:47:44.195: unsuccessful metadata update
> 14:47:44.195: -object DATABASE is in use
> 14:47:44.195:
>
------------------------------------------------------------------------
> ----
>
> I have no connections open to the database except the one being used
> to delete it (I know this because all access is mediated by C++
> wrapper objects and the count is 0.) but I cannot delete the file,
> so SOMEONE is keeping it open.
>
> It seems an odd message to get when deleting a database from a new
> connection. FB version is "WI-V2.0.1.12855 Firebird 2.0". Anyone
> know what is going on?

Nope,

But if this is embedded, it must be a local file on the server. You
should be able to just delete the database file once you are disconnected.

If I had to guess, I wonder if there is some garbage collection thread
going on. Does shutting down the database first help? (These are only
guesses.

Adam