Subject Re: Database in use after disconnect and close
Author hhtan37
--- In firebird-support@yahoogroups.com, Norman Dunbar <Norman@...> wrote:
>
> Morning Wesly,
>
> > I am using delphi+fibplus component to create a firebird database during run time. After created the database, run script to create a single table and insert some records of data then disconnect and close it.
> Did you commit?
Yes. I trace my program, all transaction committed.

>
> > After disconnect, I execute gfix command in my application to set the database mode to read only but system prompt for database in use.
> Does your application definitely disconnect?
Yes. I trace my program after database.connected := false.


>
> > How to "totally close the database" in run time ??
> See http://www.firebirdsql.org/manual/gfix-dbstartstop.html for gfix
> details. Note that pre Firebird 2 is at the top and a separate section
> exists for Firebird 2 onwards.
>
> However, to shut the database down:
>
> gfix -shut multi -attach 0 database_name_or_alias
>
> This allows multiple maintenance sessions from SYSDBA or the owner of
> the database, but no-one else.
>
> or;
>
>
> gfix -shut single -attach 0 database_name_or_alias
>
> This allows only one maintenance session in total, which can be from
> SYSDBA or the owner of the database.
>
> or;
>
> gfix -shut full -attach 0 database_name_or_alias
>
> No sessions are allowed, the database is down and unavailable.

You mean that i need to shut down the database before running gfix to set read_only mode ?

The database already confirmed was disconnected. why still need to shut down ?

Thanks
>
>
> HTH
>
>
> Cheers,
> Norman.
>
> --
> Norman Dunbar
> Dunbar IT Consultants Ltd
>
> Registered address:
> Thorpe House
> 61 Richardshaw Lane
> Pudsey
> West Yorkshire
> United Kingdom
> LS28 7EL
>
> Company Number: 05132767
>