Subject | Re: [firebird-support] Interbase + Firebird |
---|---|
Author | Helen Borrie |
Post date | 2007-10-02T03:58:59Z |
At 07:15 AM 2/10/2007, you wrote:
Now, from the Firebird POV, setting the RemoteServicePort parameter
and then infixing the port number in the connection string is just
fine. As you have seen already, it works.
However, InterBase 7 doesn't know about any of that stuff. It knows
about stuff like licensing and a few other things that Fb doesn't
know about, but it doesn't know about the finer points of network usage.
You probably can continue to use the Interbase client library. The
connection fandango happens in a little capsule between client and
server, known as "the Y-valve". Here is where connection
incompatibility will bite you.
I suggest the following:
1. Open the Services file (found in your Windows
..\system32\drivers\etc folder) and look for the entry
gds_db 3050/tcp #InterBase or
Firebird server
(the wording of the #comment might vary, depending on whether the
entry was put there by InterBase or an old version of Firebird).
If it is missing, add it, but for others' benefit, just comment it as
#InterBase server.
Next, open a new line and an an entry for the Firebird service port
exclusively, using a different service name, e.g.:
fb_db 3051/tcp #IFirebird server
Save the services file with your changes.
2. Now, go to firebird.conf and comment-out the RemoteServicePort
parameter, keeping the value at 3051 for documentation
purposes...then, go to the RemoteServiceName parameter, remove the
comment marker and change the value to the service name you added to
the services file, e.g.
RemoteServiceName = fb_db
Now, that *should* be enough, provided you shut down the Firebird
server and restart it. Test it out. It should not be necessary to
use the port identifier with your hostname. However, it's hard to
know what might be hard-compiled into your application by Delphi,
esp. if you are using IBX and/or you have some legacy stuff hanging
around in old DB params. If need be, make your connection string as
Server/fb_db:D:\MyDatabases\Database1.fdb
i.e., using the service name as your infix, rather than the port number.
Let us know how you get on...
Just a tip when deciding an alternative service port to use for
Firebird connections, it's a better idea to use a high-numbered port,
such as 13050 or 13051. Most of the sub-10000 ports have been
allocated to applications long ago. Although, these days, much the
same is true of the higher ranges, it still reduces the potential for
clashing if you choose some high port number in preference to one as
low as 3051.
./heLen
>Hi All,There is - or, rather "are", since there are multiple ways.
>
>I've written a app in delphi using firebird
>when i tryed to install the app on my clients server they had IB 7.0
>running and not enough client licenence to support my app :-(
>
>so now i'm testing with FB and IB on one Machine
>setup
>IB 3050
>FB 3051 <-- also changed in firebird.conf
>
>my app uses a connection string and can connect to the FB database
>Server/3051:D:\MyDatabases\Database1.fdb
>
>but when a start the app with the normal setting
>Server:D:\MyDatabases\Database2.ib
>
>i would expect that the IB server would pick up the connection but it
>doesn't it's still the FB server ???
>
>Rebooting stoping both servers restarting them nothing helped
>
>
>What a'm i missing..
>There must be a way to let IB handle all the default calls and FB only
>the calls made to it's own port
Now, from the Firebird POV, setting the RemoteServicePort parameter
and then infixing the port number in the connection string is just
fine. As you have seen already, it works.
However, InterBase 7 doesn't know about any of that stuff. It knows
about stuff like licensing and a few other things that Fb doesn't
know about, but it doesn't know about the finer points of network usage.
You probably can continue to use the Interbase client library. The
connection fandango happens in a little capsule between client and
server, known as "the Y-valve". Here is where connection
incompatibility will bite you.
I suggest the following:
1. Open the Services file (found in your Windows
..\system32\drivers\etc folder) and look for the entry
gds_db 3050/tcp #InterBase or
Firebird server
(the wording of the #comment might vary, depending on whether the
entry was put there by InterBase or an old version of Firebird).
If it is missing, add it, but for others' benefit, just comment it as
#InterBase server.
Next, open a new line and an an entry for the Firebird service port
exclusively, using a different service name, e.g.:
fb_db 3051/tcp #IFirebird server
Save the services file with your changes.
2. Now, go to firebird.conf and comment-out the RemoteServicePort
parameter, keeping the value at 3051 for documentation
purposes...then, go to the RemoteServiceName parameter, remove the
comment marker and change the value to the service name you added to
the services file, e.g.
RemoteServiceName = fb_db
Now, that *should* be enough, provided you shut down the Firebird
server and restart it. Test it out. It should not be necessary to
use the port identifier with your hostname. However, it's hard to
know what might be hard-compiled into your application by Delphi,
esp. if you are using IBX and/or you have some legacy stuff hanging
around in old DB params. If need be, make your connection string as
Server/fb_db:D:\MyDatabases\Database1.fdb
i.e., using the service name as your infix, rather than the port number.
Let us know how you get on...
Just a tip when deciding an alternative service port to use for
Firebird connections, it's a better idea to use a high-numbered port,
such as 13050 or 13051. Most of the sub-10000 ports have been
allocated to applications long ago. Although, these days, much the
same is true of the higher ranges, it still reduces the potential for
clashing if you choose some high port number in preference to one as
low as 3051.
./heLen