As a Delphi developer, you might be working with the Firebird database engine. It's quite popular in the Delphi community, is easy to configure and deploy, has low memory requirements, and is open source. There several versions and if you have multiple clients or applications, some legacy ones might be in maintenance mode and you might need to have multiple instances of them installed side-by-side. If you're like me, you might forget which versions are listening on which ports and so use a utility like CurrPorts to remind you. But if you don't use a particular database service very often, it might not be started--or not even installed on the machine on which you're working. If you also have InterBase running, there might be conflicting or generic service names like "gdb" which doesn't tell you which engine it's for nor which version.
This confusion can be reduced if you make a few configuration file changes and install the Firebird services yourself. Here's how.
In the Firebird folder (e.g.
c:\Program Files\Firebird\Firebrid_3_0 for Firebird 3.0), the
firebird.conf file contains a TCP Protocol Settings section that allows you to define the
RemoteServicePort. Uncomment one of the two settings--the other one will be set by the corresponding entry found in the
C:\Windows\System32\drivers\etc\services file--if the entry exists. (Of course, to save changes to any files in the "Program Files" or "Windows" folders, you'll need to run your editor as Administrator.)
It'd be nice to look at the Services list in Windows and know which port on which the various database engines are listening. To do that, I manually install the database service with a custom name. Firebird's
instsvc.exe has the
-n parameter that allows you to do this.
When I finished, I got Firebird 2.17, Firebird 3.0, and Firebird 4.0 installed and listening on ports 3052, 3053, and 3054, respectively, by setting up the files as follows:
C:\Windows\System32\drivers\etc\services: added three entries:
c:\Program Files\Firebird\Firebird_2_1\firebird.conf: uncommented
RemoteServicePortand set it to 3052.
c:\Program Files\Firebird\Firebird_3_0\firebird.conf: uncommented
RemoteServicePortand set it to 3053.
c:\Program Files\Firebird\Firebird_4_0\firebird.conf: uncommented
RemoteServicePortand set it to 3054.
Then I ran the following to install the services:
c:\Program Files\Firebird\Firebird_2_1\bin\instsvc.exe i -n FB2-Port3052
c:\Program Files\Firebird\Firebird_3_0\instsvc.exe i -n FB3-Port3053
c:\Program Files\Firebird\Firebird_4_0\instsvc.exe i -n FB4-Port3054
Now when I look in the services list, I see all three Firebird services listed with their custom service name clearly indicating which version is running on which port--and none conflicting with the standard InterBase port on 3050.