Subject RE: [firebird-support] Re: Different firebird.conf with Multiple Instances of Server
Author Jarrod Hollingworth
Hi Andrew,

eddiehodad wrote:
> Thanks for the tips Jarrod (and Helen). I'm presently planning out an
> upgrade to an embedded install of IB6 to FB1.5. Its complicated by the
> fact that some clients use apps by other vendors that rely on
> embedded IB.
>
> I'm wondering if installing the service and client with a custom
> service name and port number would avoid collisions with both IB6 AND
> other apps' installs of FB??
>
> Does anyone have any experience of managing this type of deployment?

It is possible to install both FB and IB on the same computer without too
much trouble. The servers will need to use different TCP ports which you can
configure in the firebird.conf and specify it in the connection string in
the client application.

The problem, at least in Windows, is with multiple instances of Firebird on
the one computer. Deploying your FB-based application to a computer that is
used for other purposes, such as running other FB-based applications, is not
as straight-forward.

If you want to avoid potential FB version problems with other FB-based
application you need to install your own FB server with your application.
FB, at least on Win32, does not fully support multiple server instances due
to the way in which it determines which firebird.conf file to load. Even
installing the FB server to a different directory does not guarantee that it
will load its own firebird.conf - it may in fact read another servers
configuration file. I have only investigated this with FB 1.5.2 though from
browsing the source code the same applies to FB 2 alpha 2.

I have implemented a quick solution by modifying the server source code to
allow a particular exe instance to have a specified "instance name" via a
command line parameter (the FB server currently has partial instance name
support but uses a hard-coded instance name of DefaultInstance) so that the
server reads the root directory (location of configuration files and hence
TCP port and other parameters) from a different registry value than regular
FB server instances. An alternative source code change would be to specify
the actual root directory on the command line instead of the instance
name/registry value solution. My quick solution works, and I have only
implemented it for Win32, however it could be unsuspectingly broken by
future code changes due to the existing "singleton configuration object"
technique used in the server where the configuration file could be loaded
before the command line is parsed.

You mention "embedded" in your message. If you are using the true FB
embedded DLL then all of these problems go away, you can install the DLL in
your application folder and have exclusive access to your database using
your known version of FB separate to any other FB embedded application or FB
server instance.

Regards,
Jarrod Hollingworth