hammerdb_install_guide
hammerdb_install_guide
Updated Redshift Cloud Analytic queries with the ones published by Oracle later than the original Oracle
only ones were published
Added TclODBC package for SQL Server on Linux
Updated GUI to enable SQL Server on Linux option
Removed mssqls_schema XML config parameter
Added mssqls_linux_server,mssqls_linux_athent,mssqls_linux_odbc to configuration for Linux default
Deprecated original SQL Server TPC-C schema as imcompatible with bulk load
1
Thomas Kejser SQL Server TPC-C schema set as default for all platforms
Corrected setting of no_d_next_o_id in SQL Server TPC-C Neword stored proc
Added SQL Server TPC-C In-Memory OLTP (Hekaton) Schema
Added identity column to SQL Server TPC-C History for Primary Key
Added mssqls_imdb mssqls_bucket mssqls_durability in-memory options
Set autocommit to on for SQL Server Timed TPC-C to view change in NOPM values for In-memory
Modified SQL Server TPC-C schema to all lower case for binary collation use
Modified SQL Server TPC-H schema to all lower case for binary collation use
Modified SQL Server TPC-H queries to replace count() with count_big()
Added option to create TPC-H schema as clustered colunmstore
HammerDB has been built and tested on the following 32 and 64-bit Linux and Windows platforms.
*HammerDB has not been tested on any version of Microsoft SQL Server prior to 2008 and no updates will
made to support prior releases. In particular functionality used in HammerDB is known absolutely to not be
compatible with SQL Server 2000 or earlier. SQL Server 2005 has not been tested. For SQL Server 2012 and
2016 use SQL Server Native Client 11.0, for SQL Server 20008 use SQL Server Native Client 10.0. For SQL
Server on Linux use ODBC Driver 13 for SQL Server. SQL Server In-memory OLTP and Columnstore Indexes
have been tested on SQL Server 2016 and no updates will made to support prior releases. Although
HammerDB includes support for SQL Server on Linux on 32-bit there is no SQL Server client for 32-bit Linux
and therefore this version cannot be used.
**HammerDB has been verified against TimesTen version 11.2.2.4.1, HammerDB is known not to work
against TimesTen version 11.2.2.4.0 or any earlier version and no updates will made to support prior
releases.
***PostgreSQL support has been provided both for native PostgreSQL and EnterpriseDB’s Oracle
compatible mode. Oracle compatible mode will only work against EnterpriseDB Postgres Plus Advanced
Server. With Oracle compatible mode DRITA functionality does not work against the initial release of
Postgres Plus Advanced Server 9.1AS due to a bug within the database software. To enable DRITA
functionality apply a patch to resolve this issue and test to ensure that DRITA snapshots work.
2
****The Greenplum Database is supported for the PostgreSQL TPC-H workload only.
You may compile from source to support non Linux or Windows platforms however none of these platforms
have been tested and for performance reasons critical to load testing installing HammerDB on Linux or
Windows on Intel x86/x86-64 based architectures is strongly recommended even for testing databases on
different platforms.
From version 2.12 HammerDB is available in a pre-compiled packaged format for 32-bit/x86 Linux, 64-
bit/x86-64 Linux, 32-bit/x86 Windows and 64-bit/x86-64 Windows. The most common HammerDB
installation error results from mixing incompatible 32 and 64-bit software installations. A 32-bit version of
HammerDB requires a 32-bit operating system and the 32-bit client libraries for your chosen database,
similarly a 64-bit version of HammerDB requires a 64-bit operating system and the 64-bit client libraries for
your chosen database. In some instances a 64-bit operating system may support a 32-bit version of
HammerDB, in this instance the 32-bit database client libraries are required. You should consult your
database vendors support matrix for guidance on whether running 32-bit database client software on a 64-
bit operating system is supported. Note this guidance applies to the client software used by HammerDB
only, the Database server itself if running on another server is independent and mixing 32 and 64-bit clients
and servers and different operating systems is usually a supported configuration. The most significant
difference between the 32-bit and 64-bit versions of HammerDB is that the 2GB memory limitation is
removed with the 64-bit installation, consequently the 64-bit version of HammerDB will support the
creation of a significantly greater number of virtual users (subject to RAM availability) than the 32-bit
version. Use the following instructions to determine whether your system is 32 or 64-bit for Linux and
Windows.
Carefully ensuring that you have installed a full stack of 32-bit or 64-bit operating system, database client
and HammerDB can prevent your repeating most common installation errors experienced.
Linux
On a Linux operating system run the command uname –m to determine whether your installation is 32 or
64-bit. If the command returns the following:
i686
Your system is 32-bit and you need the x86 installer package for HammerDB. If however the result is as
follows
x86_64
Your system is 64-bit and you need the x86-64 installer package.
If you have a system with HammerDB pre-installed to check the installation look in the readme file. For
example the following line:
3
denotes a 64-bit installation. You can verify this by running the following command in the HammerDB
console to show the machine type which in this case is 64-bit (note AMD64 denotes the architecture and
will be the output on both Intel and AMD processors):
You can also use the Linux file command on the executable tclsh8.6 and wish8.6 in the bin directory to
verify the compatibility.
Windows
Microsoft has published an FAQ on 32-bit and 64-bit installations here.
32-bit-and-64-bit-Windows-frequently-asked-questions
As detailed in this FAQ right-clicking on Computer and selecting properties displays the system type. The
following example shows a 64-bit x86-64 Windows installation.
When installing HammerDB on a 64-bit Windows environment the installer will automatically detect your
environment and recommend the installation of HammerDB in the correct location. For the 64-bit
application this will be in C:\Program Files and for the 32-bit application this will be in C:\Program
Files (x86) as shown in figure 2.
This bug is caused whenever any Oracle client program (including HammerDB) is installed in a directory
containing parenthesis such as the following:
4
(NOTE: This is an Oracle software bug not a HammerDB one).
Use a version of the Oracle client AND database software that contains the fix for Bug 3807408. This fix
requires that both the client and database software be patched.
OR
Find the location of the application that is generating the error. Check the path to this location and see if it
contains any parenthesis. If so, you must relocate the application to a directory without any parenthesis in
the path.
Therefore if running HammerDB on Windows and your client or database is affected by Oracle bug 3807408
then either patch Oracle or ensure that HammerDB is installed to a directory that does not contain
parenthesis.
For Oracle, TimesTen, SQL Server, DB2, MySQL, PostgreSQL and Trafodion it is essential that HammerDB can
find the correct client libraries on the HammerDB server to connect to the chosen database. In most cases
this means following the installation instructions for a client or server installation of the database software
for Oracle, TimesTen, DB2, SQL Server, MySQL, PostgreSQL and Trafodion respectively.
HammerDB will not be able to connect to Oracle, TimesTen, DB2, SQL Server, MySQL, PostgreSQL and
Trafodion you have not installed and correctly configured the database client libraries.
For MariaDB or Amazon Aurora use the MariaDB/MySQL client and for Greenplum or Amazon Redshift use
the PostgreSQL client.
For Redis the client interface is included and no additional client libraries are required.
For Oracle on Linux the important environment variables are ORACLE_HOME and LD_LIBRARY_PATH and on
Windows the PATH environment variable is set automatically during installation in the system properties.
When using the Oracle instant client Oratcl uses the additional environment variable ORACLE_LIBRARY to
identify the Oracle client library. On the Windows the Oracle client library is called oci.dll in a location such
as:
C:\oraclexe\app\oracle\product\11.2.0\server\bin
On Linux the library is called libclntsh.so where this is typically a symbolic link to a product specific name
such as libclntsh.so.11.1 for Oracle 11g.
if [ -t 0 ]; then
5
stty intr ^C
fi
For Oracle TimesTen configuration see the supplementary HammerDB TimesTen OLTP guide. In particular
note that although TimesTen uses OCI connectivity all required Oracle client software should be installed
from the TimesTen installation software and not from a standard Oracle install.
SQL Server
On SQL Server on Windows the client libraries and necessary environment variables are set automatically
during the SQL Server installation. Note that on 64-bit Windows the 64-bit ODBC client library is named
ODBC32.DLL in the following location. C:\Windows\System32\odbc32.dll and the 32-bit library is in
C:\Windows\SysWOW64\odbc32.dll. On Linux follow the SQL Server on Linux installation guide to install
'mssql-tools' with the unixODBC developer package.
DB2
For DB2 on Linux the client library libdb2.so.1 is required either in the lib32 or lib64 directory for 32 or 64-
bit installations respectively. Similarly on Windows the db2cli.dll for 32-bit and db2cli64.dll on 64-bit
libraries are required. These libraries are included with a standard DB2 installation or also with a
standalone DB2 client install.
MySQL
HammerDB version 2.22 has been built and tested against a MySQL 5.6 client installation. On Linux this
means that HammerDB will require a MySQL client library called libmysqlclient.so.18. This client library
needs to be referenced in the LD_LIBRARY_PATH in the same way described for Oracle previously in this
section. If you do not have the correct client library you can install compatibility libraries as referenced in
this HammerDB discussion topic. On Windows the MySQL client library is included with HammerDB.
PostgreSQL
For PostgreSQL the client library is called libpq.dll on Windows and libpq.so on Linux however note that
additional libraries are also required. For Windows this means setting your PATH environment variable such
as the following:
D:\PostgreSQL\pgsql\bin;
On Linux it is required to set the LD_LIBRARY_PATH environment variable in the same way described for
Oracle previously in this section to the location of the PostgreSQL lib directory. Alternatively for
installations of EnterpriseDB the client directory also contains the necessary files for a HammerDB
6
installation. Where both 32 and 64-bit installations PostgreSQL is particularly sensitive to requiring a PATH
or LD_LIBRARY_PATH with the required versions of the libraries. Failure to do this will result in the error
“invalid argument” as shown.
When following the troubleshooting section further in this document to manually test PostgreSQL library
loading if the error “invalid argument” is received ensure that the PATH or LD_LIBRARY_PATH environment
variable points to the correct location only (and no other location). On Windows you also need to reboot
your system when you have changed the PATH to ensure that the correct library is loaded without error.
Redis
The Redis client package is included with HammerDB for all installations and requires no further
configuration.
Trafodion
For Trafodion it is necessary to install and configure the Trafodion ODBC client libraries. Connectivity
information is then set in the relevant client ODBC configuration files, for example the location of
/etc/unixODBC and the configuration files of odbc.ini and odbcinst.ini.
Download your preferred release from the HammerDB download page , downloads are served from the
HammerDB sourceforge project and you may if preferred to download directly from the HammerDB project
page under the Files menu.
If you require checksums to validate your download navigate to the required file under the sourceforge
project page and click the information icon “ “ this displays the checksum information that you can use
to validate your download.
HammerDB is installed on both Linux and Windows with a graphical installer, consequently on Linux you
need an X Windows environment with which to display the installer. Configure your DISPLAY environment
variable to point to the correct X Windows display.
To start the installer on Linux make the installer file executable and then run the installer executable.
On Windows double-click on the setup file that is appropriate for your system.
7
Figure 3 HammerDB Windows Setup
The installer will start giving you the option of selecting the installation language
Figure 5 Continue
8
Figure 6 Welcome
Choose the destination location and Click Next. To change the default location Click Browse and select a
new location.
9
Click next to start copying the installation files
10
Figure 9 Copying Files
Figure 10 Complete
11
Figure 11 Application Window
An alternative theme can also be chosen for the interface, details on changing the interface are given in the
section config.xml below.
12
Figure 12 Alternative Theme
Starting HammerDB
This section details how to start HammerDB after the software has been installed.
Linux
On Linux run HammerDB with the user with the correct permissions to access the database environment to
which you are connecting. The following example shows the oracle user for which we have configured the
Oracle client environment as shown previously in this document. Then set the DISPLAY environment
variable.
and as the user for your chosen database run hammerdb.tcl directly from within the HammerDB directory.
13
Windows
To run HammerDB on Windows make sure that you have the correct permissions for your user to load
the required database libraries. If you are unsure review the section on Microsoft UAC later in this
document. Start HammerDB by double-clicking on the file hammerdb.bat.
Config.xml
In the HammerDB directory is a configuration file called config.xml that is read when HammerDB starts. If
the config.xml file is correctly formed the data defined will be applied to the menus and options within
HammerDB to enable customisation to your own environment.
In the look and feel section there is the option to set alternative themes. At version 2.22 this setting can be
“classic” for the default theme or “modern” for the updated scheme.
In the benchmark section the value of the rdbms setting can be Oracle, MySQL, MSSQLServer , DB2,
PostgreSQL, Redis or Trafodion.
For the other config.xml values please consult the relevant guides for the workloads they represent.
14
Uninstalling HammerDB on Linux and Windows
HammerDB is entirely self-contained meaning that all the files installed are located in the HammerDB
directory, no files or libraries are installed in any other location by HammerDB although HammerDB of
course does require the pre-installation of the required client library files. To uninstall HammerDB on Linux
run the uninstall executable as follows:
[oracle@server1 HammerDB-2.22]$./uninstall
Figure 14 Uninstall.exe
Answer Yes to the prompt
15
Figure 16 Uninstall Complete
Troubleshooting
The following sections give examples of how to troubleshoot installation and configuration issues with
HammerDB.
By far the most common HammerDB configuration error is to incorrectly setup the client libraries required
for Oracle, SQL Server, DB2, MySQL, PostgreSQL and/or Trafodion respectively or to incorrectly mix 32 and
64-bit environments on the same system. The following example shows a library error reported by a virtual
user when loading Oracle.
16
Figure 17 Oracle OCI Library Error
To troubleshoot library errors you can manually verify the library loading by starting the tclsh prompt and
loading a library at the command line. On Linux for example you can do this by changing to the HammerDB
directory, exporting the LD_LIBRARY_PATH environment variable to include the HammerDB lib directory to
be searched first and then starting tclsh8.6 as follows:
17
Figure 18 bin directory
Figure 19 tclsh86t.exe
At the prompt type the command to load the library that has produced the error. The following example
shows that the loading of Oratcl was not successful as oci.dll could not be loaded with error 193. This
particular error means that the library cannot be found. Another common error, error 193 is the result of
attempting to load the 64-bit oci.dll into the 32-bit version of HammerDB on Windows and is resolved by
ensuring the correct 32-bit Oracle client is installed. Troubleshoot your error with the appropriate
documentation for your database.
18
Figure 20 oci error 193
You can check your version of GLIBC by running the following command, so for example this version of glibc
from is compatible.
# ./lib64/libc.so.6
GNU C Library stable release version 2.12, by Roland McGrath et al.
Copyright (C) 2010 Free Software Foundation, Inc.
…
# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 6.3 (Santiago)
# /lib64/libc.so.6
GNU C Library stable release version 2.5, by Roland McGrath et al.
Copyright (C) 2006 Free Software Foundation, Inc.
…
19
# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 5.6 (Tikanga)
If you see this error and cannot move to a more up to date platform you have the option of a workaround
to achieve the same aim:
1. Compile TCL and TK for your own platform as detailed below and merge the contents of the bin and
lib directories under the HammerDB v2.22 installation directory with the contents of the bin and lib
directories you have compiled whilst ensuring that you do not overwrite all of the contents in the
lib directory (ie do not delete the directories first) . Alternatively you can also leave your compiled
software in the default /usr/local directory. You may also need to recompile the extension for your
chosen database.
Note that at version 2.22 HammerDB has a dependency on features in TCL 8.6 and therefore
will not operate with the libraries from versions of HammerDB prior to release 2.16.
On some versions of the Gnome the desktop may crash when running the installer and the
following error reported in the system log.
gnome-session[13381]: mutter:ERROR:core/window.c:1748:meta_window_unmanage:
assertion failed: (window->display->focus_window != window)
gnome-session[13381]: WARNING: Application 'gnome-shell.desktop' killed by signal 6
This is a known Gnome bug with some versions. To resolve the issue either up or downgrade the
mutter package to a working version or install on a desktop without the issue such as KDE.
Microsoft UAC can prevent the running of applications. Additionally the security level may change after
applying Microsoft updates and therefore an application that previously ran without issues may experience
problems after an update has been applied.
In HammerDB if you observe an error reported in the Console on loading client libraries for your database,
this may be due to 32/64-bit errors as detailed previously or on Windows can occur as security levels have
been set too high. To prevent this happening you can either:
1. Disable UAC
To do this in the HammerDB bin directory right click the wish86t.exe executable.
20
Figure 19 wish85t.exe
Start HammerDB as normal by double clicking on the executable HammerDB.bat as described previously.
HammerDB will start and a UAC prompt will ask:
"Do you want to allow the following program from an unknown publisher to make changes to this
computer?" Program : wish86t.exe
Click Yes : HammerDB will start normally without the errors caused by UAC enabling access levels to load
the Oracle libraries.
21
DEP prevents command line execution in Windows Server 2012
If you are running HammerDB commands at the command line Data Execution Prevention (DEP) may
prevent successful execution with and error such as “unhandled win32 exception occurred in tclsh86t.exe”.
In Windows Server 2012 DEP has now been enabled by default for all programs whereas on previous
releases it was disabled by default. You can modify the DEP settings as shown to the default setting of
previous Windows Server versions.
Bug 12733000 OCIStmtRelease crashes or hangs if called after freeing the service context handle
To troubleshoot check your system logs for an application event showing a crash in orageneric11.dll such as
the following:
To resolve this Oracle issue add the following entry to your SQLNET.ORA file.
SQLNET.AUTHENTICATION_SERVICES = (NTS)
DIAG_ADR_ENABLED=OFF
DIAG_SIGHANDLER_ENABLED=FALSE
DIAG_DDE_ENABLED=FALSE
TCL
cd tcl8.6/unix
./configure --enable-threads
make
make install
TK
cd tk8.6/unix
./configure --enable-threads
make
make install
Oratcl
23
cd oratcl4.5
./configure --enable-threads
make
make install
MySQLTcl
cd mysqltcl-3.052
./configure --enable-threads -with-mysql-include=/u01/mysql/include -with-mysql-
lib=/u01/mysql/lib
make
make install
PgTcl
cd pgtcl2.0.0
./configure -with-postgres-include=/pg/PostgresPlus/9.2AS/include -with-
postgres-lib=/pg/PostgresPlus/9.1AS/lib
make
make install
Redis
Copy the Redis directory from the lib directory from one of the installer packages.
Trafodion
HammerDB utilises the tdbc::odbc package included with TCL 8.6 and therefore the installation of additional
software for Trafodion connectivity is not required when building from source.
By default your software will have been installed in the /usr/local/bin and /usr/local/lib directories. Take the
installation for HammerDB on Linux or Windows and replace the bin and lib directories with the bin and lib
directories you have just compiled. HammerDB will now run on your chosen platform.
By default all of the HammerDB source code is made available with each and every software release. Note
that the source code is identical whether run on Windows or Linux, it is only the TCL engine that is platform
specific. All of the source code is contained within the files in the hdb-modules and hdb-components
directory in human readable form made available under the GNU GENERAL PUBLIC LICENSE Version 2. The
file hammerdb.tcl loads all of the modules and components in the correct order. If wishing to compile TCL
and the packages separately for your platform the files with the *.tcl extension are all the required code you
need for HammerDB after you have compiled and installed the TCL software and extensions. Note that
support cannot be provided for HammerDB on any other operating system apart from the pre-compiled
Windows and Linux packages as test environments are not available. The platform independent HammerDB
source code is also available in the GIT repository on the HammerDB sourceforge site from version 2.14
onwards and you can retrieve updates from here, however the public GIT repository is only synchronised
with major releases. Additionally note that you will need to either use the contents of the bin and lib
directories from a precompiled version or build your own executables and libraries for HammerDB to run.
24
Support and Questions
For help use the HammerDB Sourceforge forum available at the HammerDB sourceforge project.
25