Chau Chee Yang
Chau Chee Yang

Reputation: 19640

How to stop firebird process that was run as application in command line?

We may run Firebird as application using command line:

firebird.exe -a -p 3050

Is that possible to shutdown the firebird process using command line too?

Upvotes: 0

Views: 6841

Answers (1)

Mark Rotteveel
Mark Rotteveel

Reputation: 109090

There is no "easy" way to do it. If you started firebird.exe as an application, you can quit it by right-clicking on its icon in the taskbar, and selecting shutdown.

The only alternative is to kill it using taskkill, for example:

taskkill /IM firebird.exe

This has the following downsides:

  • if you have active connections, this will produce a popup to ask for confirmation of shutdown (just like when doing this from the taskbar)
  • if you have multiple firebird.exe processes, they will all be terminated

You can also force kill to shutdown, this will not produce the popup; open connections will be killed without prompting:

taskkill /F /IM firebird.exe

However, if you regularly need to do this, it might be better to install Firebird as a Window service that doesn't startup automatically. You can then control the service using NET START and NET STOP (or using instsvc).

For example, install Firebird as a service (require administrator command prompt):

instsvc install -demand -name firebird3

This creates a service called "Firebird Server - firebird3"

You can then start and stop the service using NET START "Firebird Server - firebird3" and NET STOP "Firebird Server - firebird3", although this also requires elevated administrator privileges.

Upvotes: 2

Related Questions