Category:Database scripts

From Heureka Wiki
Jump to: navigation, search

Automatic upgrading in version 1.0.3 and later

Version 1.0.3 of all applications automatically upgrades the database if necessary.

Older versions

When upgrading your Heureka applications you may have to upgrade your Heureka forest database. There are two different type of Heureka databases:

  1. The forest database: This database contains forest input data that describes the current forest state. It used as input for the simulations.
  2. The result database: Here your simulation and optimization results are stored.

The forest database must be supplied by the user, while the result database is created by the system.

To upgrade your forest database you need to run the script or scripts provided on this page (under the section "Upgrade scripts"). The script/scripts for each upgrade are named with the same release number as the applications.


The upgrades only apply to the forest database, the result database is upgraded automatically when running the applications.

It is strongly recommended that you back up your forest database before running any scripts.

To find out the release (version) number of your current forest database, look in the Version-table of the database (right-click the table "dbo.Version" and choose "Open Table").

Each update needs to be run in the correct sequence; Run lower release numbers before release numbers with a higher number.

To upgrade your forest database

  1. Open SQL Server Management Studio
  2. Select the Heureka forest database you wan't to upgrade. (Again, if you haven't already made a back-up of the database, this is the right time, and strongly recommended)
  3. Click "New Query".
  4. Copy the script from the link below
  5. Paste the script in the query window.
  6. Before proceeding - Make sure that the correct database is selected (shown in the toolbar and in the statusbar at the bottom of the page).
  7. Click "Execute". If the scripts are run in the correct order you should get positive message as response. If you do get an error, the script has not executed correctly. Restore the back-up you made previously and contact the Heureka-team for support.
  8. If you will run more than one script, perform step 4-7 for every script (be sure to run them in the correct order).