Subject Re: ODBC setup - setting up a server properly
Author Adam
Hello Stef,

Just a couple of basics to help you on the way.

* You can not access your database through a shared folder.

The database can be placed in any folder on the server providing it is
on a drive controlled by the server, so feel free to put it on c
drive, d drive, f drive or whatever (providing these are not simply
mapped drives to a share).

There are a few reasons for this which you can look up later yourself.
It is also bad practice, because you do not want clients to be able to
download the database file. If they could do that, they could transfer
it to another machine and bypass your security.

* Rename the file to .FDB

It will work as .GDB, but under certain windows environments, windows
will do some nasty file copy to a backup file which will kill the
performance. Simply File->Rename and change .GDB to .FDB

* Install Firebird on the machine hosting the FDB file

It does not need to be installed on client machines. Work out whether
you want superserver or classic server (superserver is normally ideal
for single CPU systems, classic is ideal for SMP systems), but read up
the docs for more information about each and choose the right one.

* Use aliases

Why do your client machines need to know where abouts on the server
the database is located. What if in the future that drive runs out of
space or you decide to change the server to a different OS or
something? You would need to adjust the connection string

Locate the aliases.conf file. It is by default in c:\Program
Files\Firebird\Firebird_1_5\.

Open it in notepad, and add a record for your database.

For example:

MyDatabase = D:/Firebird/database.fdb

Save the file and close notepad.

The connection string is now simplified

2000server:MyDatabase

If you ever move the database to a different folder, you just need to
change the aliases.conf file and no changes are required on your
client workstations.

* Diagnosing Connections from client

First try

ping 2000server

It must be able to resolve to an IP address or there is a network issue.

If you do not have a firewall between client and server, then it
should give you reply .....
If there is a firewall, it may block pings so don't worry too much if
it times out.

Second

telnet 2000server 3050

If the screen goes black, it all works great. Otherwise, check the
message (connection refused etc). If the connection is refused, then
try the same command from the server itself. If that fails, then the
Firebird service is not running. If that succeeds, then a firewall is
preventing your client from accessing port 3050 (which Firebird is
listening for).

* Requirements for the client machines

In the application folder, you will need to put the FBClient.dll.
Depending on the library you are using, you may need to rename this to
gds32.dll.

Once you have successfully diagnosed the connection, fire up your
program because it should now work.

Adam