Data Migration

The Data Migration feature can be used to migrate configuration data (Calc Rules, Policies, Events, and so on) from one database to another. For example, your company may initially install and configure the application on a test database. Once testing is complete and all the necessary configuration changes have been made, your company can then begin using a production database. The Config Export and Config Import forms allow you to move the data from the test database into a production database, without having to recreate the test configuration on the production database.

The data you can export and import is grouped into contexts in the Config Export and Config Import forms. For a list of these contexts and the data that is included, see Data Migration Contexts.

You can import data by inserting new records, updating existing records, or both. The Config Import form allows you to select the Import Type (Insert, Update, or Insert/Update).

You can only import to a database that has the same schema version as the database that exported the data.

Note: When you export records (using the Config Export form) for Update, make sure the Start and End Dates of the records you are exporting match the Start and End Dates of the records you are updating. Otherwise, the update may fail because the dates do not match.

See Also:

Data Migration Contexts

Use the Data Migration Feature

Config Export Form

Config Import Form

 

Data Migration Contexts

You can import and export data from tables belonging to the following contexts.

To include system-defined records (such as the System Default policies and event templates), you must select Include System on the Config Export form.

Charge

Definition

Event

Interface

Payroll

Employee Group

Policy

Rules

Schedule Cycle

Security

System

Terminal

 

Use the Data Migration Feature

  1. Log in to the application that is connected to the database you want to export (for example, your test database).

  2. Click Main Menu > Configuration > Migration > Config Export.

    The folders that display in the middle of the form are the Data Migration Contexts.

  3. To export all contexts, select the All check box.

  4. To select which contexts to export, click the  button to expand the folder and check the option you want to export.

  5. The default export File Name is MigrationExport.xml. Change the name as needed.

  6. To export only those records updated by a specific person, enter the Person Number in the Updated Person Num field.

  7. To export only those records updated after a certain date, select the Use Updated After check box and select the Updated After date.

  8. Select the Include System check box if you want to include system defined records in your export file (records for which Updated By is set to SYSTEM).

  9. Click Export.

    Your browser will display a message asking if you want to save the file.

  10. Save the migration export file to the location of your choice.

  11. Log in to the application that is connected to the database where you will import the data (for example, your production database).

  12. Click Main Menu > Configuration > Migration > Config Import.

  13. Click the Browse button next to the XML File field.

  14. Select the migration file you saved in step 10.

    The Data Migration Contexts from the XML file will display in the middle of the form.

  15. If you want to import the items in the file, skip to step 20.

  16. If you want to compare the items in the file with the database, select the contexts you want to compare and click the Compare button. Continue with the steps below.

    If there are any differences between the file you are importing and the database you are logged into, the Differences pop-up form will display.

    This form will show records that are in the import file but do not exist in the database. The form also shows records in the import file that are different from the records in the database.

  17. If you only want to import these differences, click Save Differences XML. Otherwise, click the Close button when you are done viewing the differences.

  18. If you clicked Save Differences XML, your browser will display a message asking if you want to save the file. Save the file to the location of your choice. You can now import this differences file.

  19. To continue importing data, click the Browse button next to the XML File field and select the file you saved in step 18. Continue with the steps below.

  20. Select the contexts you want to import. To select individual items in a context, click the button to expand the context folders. Select the items you want to import.

  21. Select the Import Type for the data you are importing.

    Select Insert if you are importing only new records into your database. Select Update if you are updating existing records. Select Insert/Update to insert the record if it does not yet exist, or update the record if it already exists.

    Detail records are imported in Insert/Update mode. When a record is being updated, its detail records will be inserted if they do not yet exist, or updated if they already exist. Likewise, if a detail record does not exist in the import file, it will be deleted from the database.

  22. To validate the data before attempting to import it, click Validate. If the selected records can be imported, a Validate Successful message will display. Otherwise, the Import Log form will open to display any error messages. For example, if a record already exists, an error will display. Click the Close button when you are done.

  23. To import the data from the XML file, click Import. If the selected records were imported, an Import Successful message will display. Otherwise, the Import Log form will open to display any error messages. Click the Close button to close the Import Log form.

Note: If you import rules, you need to use the Sync Rule button on the Calc Rule form to recompile the rules in the new database. The Sync Rule button will make sure the imported rules are in sync with the sequences in the database.