Subject | RE: [firebird-support] Firebird shutdown, backup & restore possible with IBX? |
---|---|
Author | Alan McDonald |
Post date | 2005-07-26T02:05:39Z |
> Mathias wrote:I don't see why this is an error. You are blocked from dropping the db if you are connected elsewhere.
>
> > ... I will now try to do the same with the Firebird command line
> > tools and see if I run into the same error.
>
> Hello Folks!
>
> This is staggering. Even with the Firebird command line tools I run into
> the same problem.
>
> You can easily reproduce the error on your machine. Open two command
> prompts. And execute the following command in prompt 1:
>
> * isql "localhost:C:\Program Files\Firebird\Firebird
> 1.5\examples\Employee.fdb" -user sysdba -password masterkey
>
> You are now connected to the Employee example database.
>
> Then execute the following commands in prompt 2:
>
> * gfix -shut -force 0 "localhost:C:\Program Files\Firebird\Firebird
> 1.5\examples\Employee.fdb" -user sysdba -password masterkey
> * gbak -backup "localhost:C:\Program Files\Firebird\Firebird
> 1.5\examples\Employee.fdb" "C:\Program Files\Firebird\Firebird
> 1.5\examples\Employee.gbk" -user sysdba -password masterkey
> * gbak -replace_database "C:\Program Files\Firebird\Firebird
> 1.5\examples\Employee.gbk" "localhost:C:\Program
> Files\Firebird\Firebird 1.5\examples\Employee.fdb" -page_size 4096
> -user sysdba -password masterkey
The first connection is SYSDBA so it is not going to get booted off.
> * gfix -online "localhost:C:\Program Files\Firebird\Firebird
> 1.5\examples\Employee.fdb" -user sysdba -password masterkey
>
> The gbak -replace_database will run into the error:
> gbak: ERROR: could not drop database localhost:C:\Program
> Files\Firebird\Firebird 1.5\examples\Employee.fdb (database might
> be in use)
> gbak: Exiting before completion due to errors
>
> Reading in Helen Borries "Firebird Book" on the Shutdown "gotchas" (page
> 841) ...
>
> "If either the owner or SYSDBA was already logged in when the
> shutdown took effect, the server will not block the other from
> logging in once the shutdown is in effect."
>
> I would say that if the user running ISQL is not SYSDBA and not the
> owner he should be kicked-out off the database and not be allowed to
> reconnect. Then a restore with replace option should really work,
> shouldn't it?
>
> Thanks for a short answer in advance.
>
> Salut,
> Mathias