Subject Re: [firebird-support] Shutting donw fbserver programmatically
Author Paul Reeves
On Monday 31 May 2004 07:41, Nando Dessena wrote:
> I wrote:
>
> N> Is there a safe way to programmatically shutdown the fbserver
> N> process, while it is running as an application?

It doesn't matter whether it is running as an application or a service.
You can use the firebird services api to check if there are active
attachments to any database on the server. You can then proceed to
shutdown the database(s). Unfortunately, if users are logged in as SYSDBA
they wont get kicked off. The next step is to take whatever action is
needed to kill the server - this is platform dependant.

> N> What does the
> N> "shutdown" menu item of the tray icon context menu do?
>

It tests to see if there are active connections and warns you if there
are. If there are no connections, or you click on OK it kills the
process. Tests for a connection are only made when running as an
application. No tests are made when running as a service. (This is bad.)

It should be noted that server shutdown is not the same as database
shutdown. The former is radical and potentially destructive. The latter
is benign. The latter is also the source of much head scratching if you
forget to bring the database back online.


Paul
--
Paul Reeves
http://www.ibphoenix.com
Supporting users of Firebird and InterBase