Subject Re: [firebird-support] Server selection rule
Author Helen Borrie
At 09:41 PM 26/01/2007, you wrote:
>Hi,
>
>I wonder how the server is selected for a local database if multiple
>available. Of course, it depends on the program, currently I ask
>about gbak.

Assuming you are talking about multiple servers running
simultaneously on the same host with the installation defaults, there
is no predestined "selection", regardless of the program you are
using. One way or another, you have a client connecting to a
server. Any Firebird or InterBase client. by default, sends a server
request to a server that is assumed to be listening on port 3050.

If you are running multiple servers then all must listen on
*different* ports and the client must specify the port that it wants
to be heard on.

For InterBase, you must have the requisite port settings in the
Services file on both server and and client. For Firebird, you can
configure a non-default port and pass this port in the connections
string as either a port number or a symbol (but not both.)

For instructions about setting up the clients and the server for a
non-default port, refer to the chapter in the Firebird 1.5 release
notes entitled "Configuring the Service port". That chapter (as well
as the Quick Start Guide) will also tell you the syntax for
specifying the port in the client's connection string.


>Let us consider that I have Interbase and Firebird installed on a
>single computer. And assume the following commands:
>
>/ib-path/bin/gbak -b /db-path/ib.gdb ...
>/fb-path/bin/gbak -b /db-path/fb.fdb ...
>
>gbak is not standalone, it cooperates with a database server.

All client applications "cooperate with a database server". Gbak is
just like any other client application.

>So, my
>question: which servers will be used in the mentioned cases? Native
>(Interbase for ib, Firebird for fb)? Or one in both cases? If one,
>then which exactly?

If you are lucky, you will get an exception at network level and
neither will work. Otherwise, it will be "first come, first served"
and you might never know what really happened.

If you are planning to run multiple servers on a single host then,
for heaven's sake, research the issues thoroughly before you make any
assumptions.

Tip: it will be easier to modify the service port for the Firebird
server than for InterBase. As far as I recall, InterBase doesn't
support port-specific connection capability.

./heLen