I work with Firebird and Delphi, I want to implement access via internet with wirecompression; But I am unable to activate it.
I have followed the steps inside this document for the new parameter(one of the few I was able to find) How to enable WireCompression on Firebird 3.0 using FireDAC
In the tests I use Windows server 2012 R2 Firebird : Firebird-3.0.4.33054_0_Win32(32 bits) Also copied to executable folder. fbclient.dll zlib1.dll (idem server and client) created firebird.conf with wirecompression=true. and I am giving wirecompression=true inside the Firedac of the application.
Why am I unable to activate the P15:CZ compression ?
Sending connection info for the example:
================================
Connection definition parameters
================================
DriverID=FB
Database=miservidor001:C:\sysdat\C100\gestdat03.fdb
User_Name=SYSDBA
PassWord=*****
WireCompression=true
================================
FireDAC info
================================
Tool = RAD Studio 10.2
FireDAC = 16.0.0 (Build 88974)
Platform = Windows 32 bit
Defines = FireDAC_NOLOCALE_META;FireDAC_MONITOR
================================
Client info
================================
Loading driver FB ...
Brand = Firebird
Client version = 300049900
Client DLL name = C:\APPS\WC01\fbclient.dll
================================
Session info
================================
Current catalog =
Current schema =
Server version = WI-V3.0.4.33054 Firebird 3.0
WI-V3.0.4.33054 Firebird 3.0/tcp (WIN-2012LAGO003)/P15:C
WI-V3.0.4.33054 Firebird 3.0/tcp (nucleo)/P15:C'
NOTE: I don't know Delphi nor FireDAC, this answer is based on the general behavior of Firebird and my experience with maintaining its JDBC driver (Jaybird). So it is possible that there is a better answer specifically for FireDAC/Delphi.
Enabling or disabling wire compression is entirely determined by the client, not by the server. This means that configuration of the server is not necessary nor has it any effect, except in cases where the server itself acts as a client, for example with
execute statement ... on external datasource.To be able to use wire compression, you need three things:
fbclient.dllzlib1.dll(in the same location asfbclient.dll, or on the search path)Point 3 is likely your problem: I'm not sure if FireDAC has a connection property
WireCompressionthat actually enables wire compression.I know of two ways to enable wire compression for the client:
Create a
firebird.confin the same directory as thefbclient.dllused by your application. In this configuration file, put the requested configuration options (one per line):Instead of creating a
firebird.conffile, pass the configuration (with linebreaks separating config options) in theisc_dpb_config(int 87) database parameter item.The value is the same as the content of the
firebird.conffile in the previous option. This may run into size issues if the client is using the old database parameter buffer format (where strings are max 255 bytes) and you want to pass (a lot) more config options.Option 1 is probably the simplest and will work for all frameworks. Option 2 depends on whether or not the framework or driver exposes the database parameter buffer or if it has a connection property that maps to
isc_dpb_config.For example in Java using Jaybird, you can enable compression (only when using native connections) using:
This prints out
WI-V3.0.4.33054 Firebird 3.0,WI-V3.0.4.33054 Firebird 3.0/tcp (host)/P15:CZ,WI-V3.0.4.33054 Firebird 3.0/tcp (host)/P15:CZ(note this is<server version>,<server protocol info>,<client protocol info>). TheZinP15:CZmeans that the connection is zlib compressed (theCthat the connection is encrypted).Here, the
configproperty is an alias forisc_dpb_config.