SOX Database Server Migration

This documentation shows how to migrate an existing SOX database to the current version.

This migration manual applies to all supported database types (currently MySQL & Oracle).

In case database migration is not possible or the new database should be created for the new version, it is always possible to export the project from an existing SOX installation and import it into a new installation. It should be noted that exported project data does neither contain historical project information, nor the user administration.

In order to perform a proper database migration please perform the following steps:

Instructions

1. Stop the SOX server
For stopping the server please use the service_stop script from the scripts folder in the SOX server installation folder.

Before you continue with step 2 make sure to create a backup of your SOX database. Migration failures might lead to unrecoverable data or data loss! 

2. Insure GRANT’s on the SOX database
E.g. on MySQL:

GRANT SELECT, DROP, CREATE, CREATE VIEW, INSERT, UPDATE, DELETE, ALTER, INDEX, REFERENCES ON SOX_REPO.* TO 'SOX_REPO_USER'@'localhost';

3. Install the current SOX Server Version
Download the new server from our service desk (https://www.enco-software.com/en/support/downloads/) and unzip it to a location where you have the necessary administrative rights. Create a new installation folder for the new version and unzip the content of the downloaded archive.

4. Modify the sox2server.ini file to start the migration
This step is very important. Open the sox2server.ini file with a text editor and add the following argument to the end of the sox2server.ini file:

-Denco.sox2.schema.migration.version=3.3.1.003

5. Adjust the Dnet4j.config in the sox2server.ini

Either chose the configuration from previous installation or check the server installation manual for details.

-Dnet4j.config=configuration/config-mysql

6. Add the DB connector in the sox2server.ini

Either chose the DB connector from the previous installation or check the server installation manual for details.

7. Start the SOX server

This might take a while depending on the size of the repo

If you see the following message the server has started:

8. Optional DB Connection settings

If the database is not running, when the server starts, it will check for a connection 20 times every 60 seconds. To configure the duration and interval, you can use these options:

KEY → Specify as System property in the sox2server.ini. For example.:

ENV → Specify as environment variable:

 

9. Optional DB Connection settings

Please add these parameters inside your mysql config file if its possible:

 

Reason: this is the main working memory for MySQL and should be set to 80% of available memory. Raising this, will improve Database performance.

 

Reason: This should be set to 25% of innodb_buffer_pool_size, otherwise the redo-log will flush too often

 

Reason: the innodb_buffer_pool_size is divided into smaller areas given by this parameter. For fewer Users, a lower value is better, because it enlarges the memory available per active user

 

Reason: 1M is suggested is memory is available. Will speed up JOIN operations

 

Reason: 1M is suggested is memory is available. Will speed up ORDER BY operations