by Paul Reeves

  • This document uses the term Firebird to refer to all versions of Firebird since V2.5.0. It does not include earlier versions.
  • This document discusses running Firebird on Windows only. Similar principles allow running multiple versions in a posix environment, but the details of this are not discussed.
  • This discussion assumes you are logged in as administrator.
  • An underlying premise of this document is that you want install and run two different versions of Firebird. But the same principles also apply if you wish to run two instances of the same version.
  • These instructions assume Windows 10 or later.
  1. Stop your primary installed Firebird service (if any.) You can use the Task Manager, or you can open a console window in your current Firebird installation directory and use instsvc:

    instsvc q
    

    will show you if Firebird is currently running. Type:

    instsvc sto
    

    to stop the service.

  2. The server and the client library uses the FIREBIRD variable to locate various resources. This is undesirable if we run multiple instances. To check your environment for the FIREBIRD environment variable type at the console prompt:

    set FI
    

    If FIREBIRD is defined then press [Windows Key + PAUSE] to bring up the system properties dialog, switch to the advanced tab and click on the 'Environment Variables' button. Delete the FIREBIRD env var.

  3. Check for fbclient.dll and gds32.dll in your Windows system directory. Placing the client library in <sys> is useful to simplify installation of a single engine. Like the FIREBIRD variable it can get in the way of running multiple servers. At the command prompt type:

    instclient q f
    

    If installed then type:

    instclient r f
    

    to remove it. Then repeat for gds32.dll:

    instclient q g
    
    instclient r g
    

    If something goes wrong at this point it will be necessary to remove the files by hand and manually edit the registry entries for shared libraries.

  4. Install a second version of Firebird using the binary installer.

    • DO NOT accept the default directory.
    • DO NOT install Firebird as a service. (ie, run as an application.)
    • DO NOT install the guardian.
    • DO NOT copy gds32.dll to the system dir.
    • DO NOT start Firebird at the end of the installation session.
  5. Edit the newly installed firebird.conf file in your favourite text editor. Some or all of the following settings need to be modified from the defaults. (Remember to remove the # - all text after it is considered a comment.)

    tcp/ip:

    #RemoteServiceName = gds_db
    #RemoteServicePort = 3050
    

    You can use a different RemoteServiceName, but if you do it needs to be added to the services file. (Typically found in <sys>driversetc). Generally, it is easier and quicker to just use a port number, ie, change the value assigned to RemoteServicePort.

    NetBeui and pipes:

    #RemotePipeName = interbas          # Removed in FB5
    #IpcName = FIREBIRD
    

    These settings are not discussed in this document. However it is recommended to make them unique for each instance you wish to run. For example:

    IpcName = FIREBIRD3
    

    Other settings of possible interest:

    #RemoteAuxPort = 0
    

    This is used for events. It is usually assigned dynamically by the Firebird server. It should not need changing unless you are behind a firewall.:

    #RemoteBindAddress =
    

    Allows you to specify the network interface that the server listens on. The default is all.

  6. Configure firewall If you have configured your primary installation to be accessible through the firewall you should also consider opening the RemoteServicePort for secondary installations. And do not forget the RemoteAuxPort if it has been set.

  7. Configure the new service

8. Restart your primary server as a service or application as desired. You can use the Task Manager for this, or else instsvc via a console prompt. 8. Start your secondary server from the console prompt, or create a shortcut and place it somewhere convenient. The important point is to use the -a switch to start Firebird as an application:

c:\mysecondfirebird\bin\fbserver.exe -a
  1. Connect to your server with syntax similar to the following:

    isql localhost/30500:c:\path\to\my\database.fdb
    

    or:

    isql localhost/fb_db:c:\path\to\my\database.fdb
    

    if you have defined a service name.

  2. Alternatives

The Firebird V1.5 release notes documents a method of specifying a port number when launching a server. This is useful if you want to run two instances of the same server from a single installation. No modifications of the firebird.conf file are required.

The same document has information about using the NetBeui protocol to make connections.

Like this post? Share on: TwitterFacebookEmail


Related Articles


Author

Paul Reeves

Published

Category

Articles

Tags