Subject Re: [firebird-support] Re: ConnString for VFP works on and off (Connection handle is invalid.)
Author Helen Borrie
At 03:18 AM 18/07/2009, Bhavbhuti Nathwani wrote:
>Thanks Ismael for the response,unless I understood incorrectly, I was hoping to use Aliases as there is no way the client knows the path to where the database is located on the server. But surely the server app knows where the database is and does put it in the aliases.conf

It's not clear what you mean to say here. Applications (whether server-based or running remotely) don't configure the server. YOU do.

If you want to use an alias then you must define it in aliases.conf.

So, assuming you want to supply the alias "C17_32167" and you have installed the database named "mydatabase.fdb" in D://mydata, you would need an entry in aliases.conf like the following:

C17_32167 = D://mydata/mydatabase.fdb

Where this might trip up is if your path has spaces or other "illegal" characters in it. Then, the path argument needs double-quotes, e.g.

C17_32167 = "D://my data/mydatabase.fdb"

If you are using an alias, then make sure your application is consistent in using the alias wherever it refers to the path. Consistency with pathnames is extremely important for Firebird on Windows, because Windows tolerates variations in path identifier syntax and can massage them in ways that are unpredictable by humans. If you have applications that are establishing connections using inconsistent path names, you run the risk of connection refusal (Superserver) or database corruption (Classic).

All that said and done, the actual error you are encountering don't immediately suggest a pathname conflict. Your client can't actually resolve DEVE2 to any IP address assigned in its subnet. This could be due to a faulty network card at either end or a DNS misconfiguration.

Reserve the IP address for DEVE2 in the hosts file of the server ($windir\system32\drivers\etc\hosts) with the IP address of the host machine as it is seen by all of the clients, e.g.

nnn.nnn.nnn.nnn DEVE2 #Host server for Firebird databases

This prevents that IP address from being dynamically allocated to any other node in the network or to the wrong network card (if the host machine has multiple NICs). I treat it as "essential" for any installation on a network and hardware I don't administer myself. It ensures that, as soon as the network service is running, the Firebird server is guaranteed to be found at that address.

Someone else mentioned RemoteBindAddress. The purpose of that parameter is to anchor the Firebird host to one network card. It won't get past the problem of the network service allocating all IP addresses on a first-come-first-served basis, nor where the host's firewall blocks that IP address. Firebird has NO CONTROL WHATSOEVER over the network configuration. It always assumes that the network transport is running and that the network node is available. Under any other conditions, it just accepts the error message from the network and writes it into the firebird.log.

./heLen