11. XML & Persistent Configuration

HammerDB configuration and settings are defined in a number of XML files in the config directory.

Figure 1.26. XML Configuration Files

XML Configuration Files

From v4.7 it is recommended not to edit these files apart from the sqlitedb_dir parameter in the generic.xml file. The configuration is now stored and persisted across restarts through a series of SQLite database files located in the sqlitedb_dir directory. By default this directory is set to a temporary location and it is therefore recommended to set this to a preferred permanent storage location if desired. In the listing below the Data Base File corresponds to the XML file with the same name. Note that after the first start and creation of the Data Base File the XML configuration file will not be re-read again. If you wish to reset the configuration for a particular database if you the Data Base File for a particular database it will be recreated from the XML configuration at the next HammerDB start. The hammer.DB file contains the data related to jobs storage. Similarly if this file is deleted it will be recreated on the next HammerDB start.

   <sqlitedb>
        <sqlitedb_dir>TMP</sqlitedb_dir>
   </sqlitedb>

Figure 1.27. Database Files

Database Files

With this persistent storage after closing and restarting HammerDB it will continue with the settings previously used. For example, on startup SQL Server is shown first and already selected meaning it is not required to switch to a preferred database from the default choice.

Figure 1.28. Modified Default Database

Modified Default Database

Also note that the configuration is interchangeable between GUI, CLI and WS and therefore the settings made for one interface will be persisted for use for another interface on the same system. Therefore, for example settings made with the GUI can be stored and then run with the CLI. If it is wished to reset the settings for a particular database the corresponding SQLite database can be deleted and it will be recreated at next use.

Note that for the potential of an incompatible modified configuration the SQLite databases will be cleared if a different version of HammerDB is detected from the one that created the existing database files, reporting the following message at startup.

The existing SQLite DBs are from version v4.9. SQLite DBs will be reset to v4.10.

For this reason before running another version any existing configuration that is wished to be saved should be exported using SQLite tools and imported into the newly created database files.