Subject Re: [firebird-support] Shut Down Database
Author Ivan Prenosil
>I am using the IboAdmin components to shut down the database.
> with the below code ( Delphi 7 ).
>
> try
> ibConfig.Active := TRUE;
> ibCOnfig.ShutdownDatabase(Forced,spnWaitfor.Value);
> while IBConfig.IsServiceRunning do
> begin
> Sleep(10);
> Application.ProcessMessages;
> end;
> ibConfig.Active := FALSE;
> except
> on E:Exception do
> ShowMessage(E.Message);
> end;
>
> However after I call this procedure, I then try to rename the
> GDB file. I cannot the server is still connected to it.
> I thought calling shut down would kick off all attachments
> to the database. It seems it does not.

Unfortunately the shutdown does not free the db file completely.
I.e. if any user (be it sysdba/dbowner or not) is connected
and you shutdown the database with Forced flag, all these connections
are "broken" (even those by SYSDBA), however the file will be freed
only after they actually disconnect.

Ivan
http://www.volny.cz/iprenosil/interbase/