Subject | Re: [firebird-support] problem with Firebird connection to database on MS Small Business Server |
---|---|
Author | Helen Borrie |
Post date | 2008-11-16T03:39:50Z |
At 12:13 PM 16/11/2008, you wrote:
Firebird is a client/server system. That means multiple instances of your client application connect to one central database located on a server that is remote to them, where the Firebird service is running. You do *not* run the Firebrd service on the client machines.
The Firebird service requires that all databases are located PHYSICALLY on the *same* host machine as itself. So, by attempting to have your clients connect to shares and other virtual devices, you are breaking the rules and Firebird disallows it.
You need to decide two things:
1. *which* machine is to be your Firebird host machine. The network node name of this machine is the server name the remote client instances will use to connect to your database.
2. *which* remote protocol you want to use. On Windows (alone) you have a choice: you can use TCP/IP (recommended) or Named Pipes (sometimes referred to as "NetBeui"). This is not recommended because it is noisy and outdated, so let's go with TCP/IP.
Suppose you decide that your Win2003 SBS machine is to be the host machine and it has the network name "MAINSERVER". Any databases you want to access from network clients must be on MAINSERVER.
You mentioned a database located at C:\Data\databasename.fdb. It must be the case that databasename.fdb is physically located on the C drive of MAINSERVER in a folder named Data. This path can NOT be anything else; and the folder should NOT be assigned as a shared directory.
You also mentioned that you have the Firebird server listening on port 3051. This is not Firebird's default port so, depending on how you configured it, you possibly also need for your clients to target that port in their connection string.
The connection path that every instance of your client application must use is as follows:
MAINSERVER/3051:C:\Data\databasename.fdb
You can place an alias for this database path into aliases.conf in the Firebird server's root. Suppose you alias this database as "maindb", then your aliases.conf entry would be:
maindb = C:\Data\databasename.fdb
and the connection string used by the client application instances would be
MAINSERVER/3051:maindb
If you must use Named Pipes, you don't have quite the same degree of simplicity for accessing the server (and databases) through an alternative port. Study Chapter 9 of the Firebird 1.5 release notes for how to make this configuration in firebird.conf and the Services file of your host machine.
The protocol for a connection using Named Pipes as the network transport is:
MAINSERVER\\C:\Data\databasename.fdb
or, if you have defined the alias:
MAINSERVER\\maindb
Note that fbclient.dll is the client API library. You must have a copy of fbclient.dll in the local path of each client machine that is going to access the Firebird server.
You can make a client connection locally (an instance of a client application running on MAINSERVER, with fbclient.dll available in its access path). The same protocol options are available, plus two more:
1. Local protocol. This must be the path or alias on its own - no server or port in the connection string.
2. TCP/IP local loopback. The connection string is identical to that for remote TCP/IP clients, except that the server's host name can be replaced by localhost, viz.
localhost/3051:C:\Data\databasename.fdb
or, if you are using the alias:
localhost/3051:maindb
Local loopback is not available for Named Pipes protocol, nor for a local client that is running in a remote desktop shell.
./heLen
>P.S. Why it is necessary to run the FB server on the remote/serverUnderstanding the answer to your post scriptum will reveal why all the other things you described won't work.
>computer when opening the remote back end database, instead of using
>the Firebird service run on the local workstation machine, i.e. from
>which the front end application is being run ?
Firebird is a client/server system. That means multiple instances of your client application connect to one central database located on a server that is remote to them, where the Firebird service is running. You do *not* run the Firebrd service on the client machines.
The Firebird service requires that all databases are located PHYSICALLY on the *same* host machine as itself. So, by attempting to have your clients connect to shares and other virtual devices, you are breaking the rules and Firebird disallows it.
You need to decide two things:
1. *which* machine is to be your Firebird host machine. The network node name of this machine is the server name the remote client instances will use to connect to your database.
2. *which* remote protocol you want to use. On Windows (alone) you have a choice: you can use TCP/IP (recommended) or Named Pipes (sometimes referred to as "NetBeui"). This is not recommended because it is noisy and outdated, so let's go with TCP/IP.
Suppose you decide that your Win2003 SBS machine is to be the host machine and it has the network name "MAINSERVER". Any databases you want to access from network clients must be on MAINSERVER.
You mentioned a database located at C:\Data\databasename.fdb. It must be the case that databasename.fdb is physically located on the C drive of MAINSERVER in a folder named Data. This path can NOT be anything else; and the folder should NOT be assigned as a shared directory.
You also mentioned that you have the Firebird server listening on port 3051. This is not Firebird's default port so, depending on how you configured it, you possibly also need for your clients to target that port in their connection string.
The connection path that every instance of your client application must use is as follows:
MAINSERVER/3051:C:\Data\databasename.fdb
You can place an alias for this database path into aliases.conf in the Firebird server's root. Suppose you alias this database as "maindb", then your aliases.conf entry would be:
maindb = C:\Data\databasename.fdb
and the connection string used by the client application instances would be
MAINSERVER/3051:maindb
If you must use Named Pipes, you don't have quite the same degree of simplicity for accessing the server (and databases) through an alternative port. Study Chapter 9 of the Firebird 1.5 release notes for how to make this configuration in firebird.conf and the Services file of your host machine.
The protocol for a connection using Named Pipes as the network transport is:
MAINSERVER\\C:\Data\databasename.fdb
or, if you have defined the alias:
MAINSERVER\\maindb
Note that fbclient.dll is the client API library. You must have a copy of fbclient.dll in the local path of each client machine that is going to access the Firebird server.
You can make a client connection locally (an instance of a client application running on MAINSERVER, with fbclient.dll available in its access path). The same protocol options are available, plus two more:
1. Local protocol. This must be the path or alias on its own - no server or port in the connection string.
2. TCP/IP local loopback. The connection string is identical to that for remote TCP/IP clients, except that the server's host name can be replaced by localhost, viz.
localhost/3051:C:\Data\databasename.fdb
or, if you are using the alias:
localhost/3051:maindb
Local loopback is not available for Named Pipes protocol, nor for a local client that is running in a remote desktop shell.
./heLen