Data Migration
The “Data Migration” feature allows developers to easily migrate their operational data from one machine to another. Note that the operational data is the data that is created by end users (or in some cases it is a testing data of the developer being moved to another machine or environment). The operational data does not include application configuration. which can be easily imported or exported to/from the Configuration Tool.
Migrating operational data is more difficult if you are doing it manually - you need to know which tables to export and how to import them. It is especially difficult if you want to change the database engine used.
The “Data Migration” features makes it easy to migrate the operational data. This feature supports the following: 1. Copying from the production environment to the testing environment 2. Copying from the testing environment to the production environment 3. “Replace” or “Add” mode where you are adding imported data to the existing data or replacing existing data with the imported data. 4. Import/Export to an environment with a different database engine
In all these scenarios Aware IM automatically performs required management of Aware IM ID's, backs up and restores the appropriate tables.
The first step is to export the data. To do this you need to select the “File/Export Data” command from the main menu. You do not need to select a particular business space or a business space version to export the data. The “Export” dialog will be displayed. Here you need to specify the business space to export from (it will be initialised with the name of the selected business space) and select whether you are exporting production or testing data. If the business space does not have any testing data, the corresponding radio button will be disabled and the production data will be automatically selected. Then you need to specify whether to export all business objects or only selected ones. Finally, you will have to specify the name of the file to export to. Once export finishes a zip file with a specified name will be created in the specified directory. This file will need to be transferred to the target machine and imported there.
Before you import the data it is strongly recommended that you back up the target database using database tools!
Also, before you import you must make sure that the target system uses the same version of the application configuration as the version from where you exported the data. If versions are different Aware IM will display a list of issues and possible workarounds and if you don’t resolve the issues it will refuse to import the data. So you may need to do the following: 1. Export the configuration of the application from the source machine To do this select the business space version, right click and select the “Export Configuration” menu item from the context menu. 2. Import the configuration file into the target machine To do this create a new business space version or select the existing one, right click and select the “Import Configuration” menu item from the context menu. 3. Publish the business space version (or put it under test if you are importing operational data into the testing environment)
To import the operational data you need to select “File/Import Data” from the application menu. The “Import” dialog will be displayed. You need to specify the following on this dialog: - Business space to import to - Production or Testing environment If there is no business space version with the “under test” status you will only be able to select the production environment - Import file (this is the zip file you created when exporting the data) - “Commit” options Aware IM may perform import using batches. A batch is a portion of the imported records. Once committed it gets permanently written into the target database. So if errors happen after a batch has been committed the record of the batch will still be in the target database. If errors happen before the current batch has been committed all records of the current batch will be restored to original values. The “commit” options indicate when Aware IM should commit a batch - after every database table has been imported (default), after a record has been imported or only once at the end of import. Which option to use depends on the number of records to import. If it is not too big you may choose to commit just once. - Whether to import all business objects or selected objects only - Whether to delete existing data before importing If you elect to delete the existing data any existing data will be replaced with the imported data. However, if you elect not to delete the data then you must also tell Aware IM how to resolve potential conflicts between the existing data and imported data. You can do it by clicking on the Settings link. Aware IM will display the dialog where you will need to specify which instances to use for “singleton” objects where only one instance of the object is allowed - for example, an instance of the SystemSettings object or objects that represent other software systems when you communicate with them via communication channels. Another potential conflict is between system users who have the same name and password. In each of these cases you need to specify whether Aware IM should use the existing instance or replace it with the imported one. - Error handling Finally you need to select how Aware IM should handle errors (truncation errors and other errors). Truncation error occurs when a record is longer than what is allowed by the database for the column where the record should be written. This may happen if you import data into a different database than the original one as different databases may have different requirements on the length of a particular column. You need to select whether Aware IM should truncate the data or log truncation errors and continue or stop import. For all other errors you need to specify whether to log them and continue or stop the import.
Once you click OK on the import dialog Aware IM will perform some validation to make sure that there are no conflicts between imported data and the target environment. If there are any issues Aware IM will display them on a separate dialog. Some of the issues listed on this dialog can be ignored and some cannot be. To ignore the issue select the issue and click on the “Ignore” link. For those issues that cannot be ignored you need to provide resolution, otherwise import will not go ahead. To provide a resolution select the issue and click on the “Resolve” link. Another dialog will be displayed where you can instruct Aware IM not to import a particular table or column or map a problematic table or column to one of the existing tables or columns. In the latter case instead of using the table specified in the import file Aware IM will use the specified table that exists in the target database. Similarly, instead of using a problematic column in the import file Aware IM will use the existing column in the target database.
When all issues have been resolved Aware IM will perform the import.