3. Known Third-Party Driver Issues

HammerDB depends on third-party driver libraries to connect to the target databases. The following are known issues with some of the third-party drivers or runtime libraries that HammerDB uses.

3.1. Oracle on Windows: Oracle Bug 12733000 OCIStmtRelease Crashes or Hangs if Called After Freeing the Service Context Handle

If you are running HammerDB against Oracle on Windows there is a long-established Oracle bug that can cause application crashes for multi-threaded applications on Windows. This bug can be investigated on the My Oracle Support website with the following reference: Bug 12733000 OCIStmtRelease crashes or hangs if called after freeing the service context handle. To resolve this Oracle issue add the following entry to the SQLNET.ORA file on your HammerDB client.

SQLNET.AUTHENTICATION_SERVICES = (NTS)
DIAG_ADR_ENABLED=OFF
DIAG_SIGHANDLER_ENABLED=FALSE
DIAG_DDE_ENABLED=FALSE

3.2. SQL Server on Linux: unixODBC Handle Validation May Become a Performance Bottleneck

Using the HammerDB client for SQL Server on Linux can be slower than the same client on Windows when using the default installed unixODBC drivers on many Linux distributions. As described in the SQL Server Programming Guidelines, when using the driver with highly multithreaded applications, unixODBC's handle validation may become a performance bottleneck. In such scenarios, significantly more performance may be obtained by compiling unixODBC with the --enable-fastvalidate option. However, beware that this may cause applications which pass invalid handles to ODBC APIs to crash instead of returning SQL_INVALID_HANDLE errors.

Recompiling unixODBC with the --enable-fastvalidate option has been measured to improve client performance significantly. Example configure options used to build unixODBC are shown as follows:

./configure --prefix=/usr/local/unixODBC --enable-gui=no --enable-drivers=no --enable-iconv
--with-iconv-char-enc=UTF8 --with-iconv-ucode-enc=UTF16LE --enable-threads=yes --enable-fastvalidate

3.3. MySQL on Linux: C++ Runtime Library Load Issue

On some Linux systems the MySQL client library may fail to load or may report errors related to C++ runtime symbols when HammerDB loads the MySQL driver. This is a third-party client library and runtime compatibility issue between the MySQL client library and the C++ runtime libraries available on the operating system.

If this issue is encountered, it can usually be resolved by preloading the system C++ runtime library before starting HammerDB. For example, on Ubuntu the following environment variable can be set before running hammerdb, hammerdbcli or hammerdbws:

export LD_PRELOAD=/lib/x86_64-linux-gnu/libstdc++.so.6

If HammerDB is started from a service or automation script, set LD_PRELOAD in that service or script before launching HammerDB. For example:

export LD_PRELOAD=/lib/x86_64-linux-gnu/libstdc++.so.6
./hammerdbcli

The exact path to libstdc++.so.6 may vary by Linux distribution and architecture. If the path above is not valid on your system, locate the installed libstdc++.so.6 library and use the matching path for your platform.

3.4. Db2 Driver is Not Included in the HammerDB Docker Image or Build

When running the HammerDB Docker image, drivers for all databases are pre-installed except for Db2. This is because the required redistributable IBM Data Server Driver for ODBC and CLI is not available to be pulled automatically within the build and the IBM documentation lacks clarity on the conditions for whether a copy of the redistributable package can be made available by HammerDB royalty-free. Therefore any user of Db2 must download and install their own Db2 client after installing Docker. This issue is tracked in Issue #404 and continues to await resolution from IBM.