
February 20th, 2004, 03:45 AM
|
 |
Bug Hunter
|
|
Join Date: May 2003
Location: Transylvania (Romania)
Posts: 277
  
Time spent in forums: 20 h 48 m 14 sec
Reputation Power: 9
|
|
Installing Embedded server from a zip kit
Installing Embedded server from a zip kit
Quote: Installing Embedded server from a zip kit
The embedded server is a client with a fully functional server linked as a dynamic library (fbembed.dll). It has exactly the same features as the usual Superserver and exports the standard Firebird API entry points.
Registry
The Registry entries for Firebird (where the server normally looks for the location of the root directory) are ignored. The root directory of the embedded server is the directory above where its binary file (library) is located.
Database access
Only “true local” access is allowed. The embedded server has no support for remote
protocols, so even access via "localhost" won't work. Authentication and security The security database (security.fdb) is not used in the embedded server and hence is not required. Any user is able to attach to any database. Since both the server and the client run in the same (local) address space, security becomes a question of physical access. SQL privileges are checked, as in other server models.
Compatibility
You may run any number of applications with the embedded server without any
conflicts. Having IB/FB server running is not a problem either.
But you should be aware that you cannot access the same database from multiple embedded servers simultaneously, because they have SuperServer architecture and hence exclusively lock attached databases.
File structure for the Embedded Server
Just copy fbembed.dll into the directory where your application resides. Then rename it to either fbclient.dll or gds32.dll, depending on your database connectivity software. Make copies having both names if you will need to use the server tools (isql, gbak, etc.)
You should also copy firebird.msg, firebird.conf (if necessary) and ib_util.dll to the same directory.
If external libraries, are required for your application, e.g. INTL support (fbintl.dll) or UDF libraries, they should be located apart from the application directory. To be able to use them, place them into a directory tree which emulates the Firebird server one, i.e., in subdirectories named /intl and /udf directly beneath the directory where the Firebird root files are.
Open your firebird.conf and set RootDirectory to the root of this directory tree. (Don't forget to erase the "#" comment marker!)
Example
D:\my_app\app.exe
D:\my_app\gds32.dll (renamed fbembed.dll)
D:\my_app\fbclient.dll (renamed fbembed.dll)
D:\my_app\firebird.conf
D:\my_app\aliases.conf
D:\my_app\isql.exe
D:\my_app\ib_utils.dll
D:\my_app\gbak.exe
D:\my_app\firebird.msg
D:\my_app\intl\fbintl.dll
D:\my_app\udf\fbudf.dll
firebird.conf:
RootDirectory = D:\my_app
Then, start your application. It will use the embedded server as a client library and will be able to access local databases.
Uninstallation
The Firebird uninstall routine preserves and renames the following key files:
preserves security.gdb or renames it to security.fbnnnn
preserves firebird.log
preserves firebird.conf or renames it to firebird.confnnnn
preserves aliases.conf or renames it to aliases.confnnnn
"nnnn" is the build number of the old installation.
No attempt is made to uninstall files that were not part of the original installation.
Shared files such as fbclient.dll and gds32.dll will be deleted if the share count indicates that no other application is using them. The Registry keys that were created will be removed. |
|