Skip to content

Create a historical database

The Historical Database (HDB) stores all on-disk historical data. Generally this will be data captured before the current day.

Set up the HDB before the RDB (Real-time Database), as the RDB requires the directory used by the HDB on start up.

To create an HDB, right-click on the Process Library folder in the dhtPackage and select New Process Instance from the context menu. Enter the process instance name (dhtHDB) and select the HDB template (DS_HDB) in the New Process Instance dialog. Then click Add.


Like the messaging server (dhtDMServer) and tickerplant (dhtTP), the HDB needs to be configured.

In Instance Details, provide a description for the instance.

The Shutdown Alerts subtab specifies what to do if the process shuts down, either normally or unexpectedly. For this system, select No action for an expected shutdown, and Restart this instance for an unexpected shutdown. This will offer a basic level of resilience.

The Reserved Parameters subtab contains the general process configuration. The only two values in here that must be set are Host and Port. To make the system portable, these can reference environment variables. Set host to the fully qualified domain name of the host you are using. Set port to ENV=DELTACONTROL_PORT=+2002. This will start the messaging server on the Kx Control port plus 2002.

Pick any available port

The example of +2002 is just a guide for incrementing port values to free ports (e.g. 2000, 2001, 2002).

The Instance Parameters subtab contains the template-specific parameters. The only parameter to set is the directory from which HDB will read data. For now, this will be an empty directory, as there is no data yet. Make sure the directory exists on the server.


Save the process instance.

Test the instance to ensure it runs. Partial logs will provide additional information.