Subject Re: [firebird-support] Re: How to shutdown Firebird server ?
Author Helen Borrie
At 01:40 AM 12/04/2008, you wrote:
>Ok Let me restart...
>
>I have a server running Firebird in application mode (-a switch). During
>the night some maintenance need to be done on that server. Before the
>maintenance start I need to close the Firebird server and restart it at
>the end. I don't want to kill the Firebird process because I don't want
>to corrupt my databases, I want to close it cleanly. I know there is
>already a way to shutdown the database only but how to do with
>fbserver.exe ? ( BTW I forgot to mention I am running Windows version).
>
>Hope this is more clear.

Not really. Let's try to figure out what you mean.

1. I have a server running Firebird in application mode (-a switch).

-- here you use the word "server" to refer to "machine that Firebird is running on. Yes or No?

2. During the night some maintenance need to be done on that server.

-- "maintenance...on that server" - some kind of work on that *machine* that is unrelated to Firebird? Yes or No?

3. Before the maintenance start I need to close the Firebird server and restart it at the end.

-- here "server" means "the Firebird server process". Yes or No.

4. I don't want to kill the Firebird process because I don't want to corrupt my databases, I want to close it cleanly.

a) "close the Firebird server [process]" and "kill the Firebird process" mean exactly the same thing to me. What do they mean to you?

b) Why do you think that killing/closing/terminating the Firebird [server] process would corrupt databases?

5. I know there is already a way to shutdown the database only but how to do with fbserver.exe ?

-- You don't do it with fbserver.exe, you do it with gfix. Exactly how you do it depends

(a) on what version of Firebird you are running, which we don't know
and
(b) what users/applications are doing at the time of shutdown. We don't know this, either.

6. ( BTW I forgot to mention I am running Windows version).

--- fbserver.exe doesn't actually run on anything else. ;-) But, given that you said before that you can't run Firebird as a service, do we assume therefore that

a) the host machine is running Windows 98?

and

b) the users are 2-tier client/server clients, not browsers accessing a web application?

7. Because you have to ask this question at all, must we assume that you have users connected and working on databases at the time you want to kill the Firebird server process? Yes or No?

a) you said "during the night" .... "some maintenance..."
b) you are worried about corrupting databases

8. If, in reality, the users have all finished their work, shut down their applications, and gone home for the night, you don't have to worry about shutting down the *databases*. We don't know, because you haven't told us what's expecting to be happening at that time.

-- you can test whether anyone is logged in to a database by attempting to rename the database file. If it works, then nobody is logged in and the database is *already* shut down. You can just go to Task Manager and stop the Firebird process.

-- if you can't rename the database file then at least one user is logged in. If it is you, then just log out of whatever application you are using and try again. If it is not you, and you are the only human there, then you can perform a database shutdown using gfix.

All the unknowns mentioned here are what I was referring to when I requested that you start again and try to make us understand what you really want to do...

./heLen