Set up the Source Version
1 On the database server, create another database schema to serve as a copy of the production data.
Oracle: If you use Oracle, please ask your DBA to create a copy of your production database in a test environment.
MySQL: If you use MySQL, follow these steps:
Start MySQL Workbench 6.0
Click the New Schema () icon from the toolbar.
Enter a unique name for the database, such as apriori_upgrade in the “Schema name” field and click Apply. Then click Apply again, and finally click Finish. The apriori_upgrade schema is in the list of schemas on the left.
Select “Users and Privileges” from the list in the top left panel
Click on the user that is named “apriori”, then select the Schema Privileges tab from the upper right side
Select the Add Entry button located on the right, mid page
Click on “Selected Schema” radio button then highlight your new schema and click OK
Select user beneath User Accounts
Select all the options under Object Rights and click Apply
Close MySQL Workbench
Repeat the previous steps for each additional deployment schema/database you are migrating.
2 Copy the data from your production schema to the upgrade schema.
On your MySQL server, open a command window.
The following steps use the mysqldump.exe and mysql.exe commands. If the MySQL bin directory is not in your PATH environment variable, Windows does not know where these commands are located. Therefore, you may have to supply the full path to the command. It is in the MySQL installation directory, which is often \Program Files\MySQL\MySQL Server 5.6\bin. Note that you may not have write permission to this folder, so if your command prompt is at that directory, you may need to specify a different location for the location of the file. You can also find mysqldump.exe and mysql.exe in the aPriori\bin directory if the aPriori client is installed.
Enter this command to export the data from the production schema (this assumes the production schema name is “apriori”):
mysqldump.exe –user=root –password=password apriori > apriori_upgrade.sql
Enter this command to import the data into your new upgrade schema:
mysql.exe –user=root –password=password apriori_upgrade < apriori_upgrade.sql
There is no status indicator showing the export progress. However, when the export is complete the command prompt window reappears and displays a new line for user input. If there are no errors shown, then proceed with the migration.
Repeat the above steps for each additional deployment schema/database you are migrating.
Keep the command window open for the next step.
3 On the migration computer, install the source version of aPriori. The installation media is listed in the prerequisites section at the beginning of this guide. It is important to use this version of software because it contains fixes directly related to migration., Install as you would normally, except change the name of the installation from the default of ‘apriori’ to include the version (e.g. ‘apriori2016R1’) and point to the database schema “apriori_upgrade”.
4 Upgrade the source database to be compatible with the latest version of the source release you just installed. Doing so allows the new source version of the software to open.
Open a command prompt in the \bin directory of the aPriori installation folder where you just installed.
Enter this command to upgrade the source database to the latest version of aPriori:
updateCompatibleVersions.cmd <user> <password>
where user and password pertain to an aPriori user account with system administrator privileges. If the build shows “successful” with no errors, then proceed with the next steps.
5 Edit the file called runStandaloneApriori.cmd located in the \bin folder where you just installed aPriori.
Change the amount of memory allocated to aPriori on line 18. The amount of memory in megabytes immediately follows “-Xmx”. The size of the database and physical memory on the machine determines the amount of memory that you need to allocate to aPriori. Change the default value to 4096m and higher if you have more than 6GB of memory installed. Make sure to leave 2GB for the operating system and other applications. Allocating too much memory to aPriori could result in paging which severely degrades performance.
(Optional) Change the cache location. aPriori uses your user home directory to cache data during the upgrade procedure. This location is typically:
C:\users\<username>\AppData\Local\aPriori.
If you do not have at least the same amount of space available on the C: drive as the size of the database, you must change the cache location to a disk that has enough space. Do so by adding the following line to the start of runStandaloneApriori.cmd. Replace “D:\temp\cache” with your choice of cache location:
set localappdata=D:\temp\cache