Posts Setup HammerDB for Database Performance Testing in Ubuntu 20
Post
Cancel

Setup HammerDB for Database Performance Testing in Ubuntu 20

Setup HammerDB for Oracle Database Performance Testing in Ubuntu 20

Download and install HammerDB

1
2
3
4
5
6
7
8
9
export HAMMER_VERSION=3.3
export HAMMER_URI=https://github.com/TPC-Council/HammerDB/releases/download
 
sudo apt-get install -y curl
curl -kLJO {$HAMMER_URI}/v{$HAMMER_VERSION}/HammerDB-{$HAMMER_VERSION}-Linux.tar.gz
tar -zxvf HammerDB-$HAMMER_VERSION-Linux.tar.gz \
  && rm -rf HammerDB-$HAMMER_VERSION-Linux.tar.gz \
  && mv HammerDB-$HAMMER_VERSION hammerdb 
  

Download and install Oracle Instant Client

Download and install Oracle instant Client here: https://www.oracle.com/database/technologies/instant-client/linux-x86-64-downloads.html

Setup Oracle database connection details in tnsnames.ora:

HammerDBcli librarycheck

Setup environment variables and run librarycheck in hammerdbcli:

1
2
3
export LD_LIBRARY_PATH=/home/alo/instantclient_19_8
export ORACLE_LIBRARY=/home/alo/instantclient_19_8/libclntsh.so
export PATH=$LD_LIBRARY_PATH:$PATH

If you encounter following error, install libaio libraries to resolve: Oratcl_Init(): Failed to load /home/alo/instantclient_19_8/libclntsh.so with error libaio.so.1: cannot open shared object file: No such file or directory

1
sudo apt-get install libaio1 libaio-dev

HammerDB Schema Build

Before start the schema build, setup the service name (need to align with tnsnames.ora), system username and password in the build option

Need to pre-create the tablespace in the database before schema build, otherwise, will get error.

Start schema build:

Schema Build completed:

HammerDB Timed Workload with Time Profiles

Under Driver Options select Timed Driver Script:

Run the workload and the result:

Virtual User Output:

Oracle Metrics:

Time Profiles Log:

This post is licensed under CC BY 4.0 by the author.