Backup and restore MorphX Version control

When an Ax environment is setup for version control with MorphX, there are times when the database needs to be restored, or another database is required to be used instead. This causes the loss of all version control data. Ax has some standard tables where it stores all this data which can be backed up and restored.
The tables used by Ax for MorphX version control are:


However due to certain Ax frameworks its just not a straight copy.

The Backup procedure:

In this procedure, i create an SSIS task and add it to a Job that runs nightly backing up data from the tables specified above to a seperate database, which is then completely backed up. This is a simple “export data” functionality within SQL, and saved in the SSIS and attached to a job.

The restore procedure:

This is where a similar export data from the backup database is done to the Ax database. There are a couple of things that need to be done before importing the data. Assuming that a different database has been restored, and Ax is compiled and syncronized.

  1. Ax does not create the tables defined above on syncronization. The parameters for MorphX need to be turned on.
  2. After setting up MorphX version control, go to Tools –> Development tools –> Version Control –> Setup –> System Settings –> click Ok.
    This creates the version control XML file definition and checks it out (Resources\SysVersionControlSystemMorphXDefFile). Check this file in and we are ready to
  3. Shut down the AOS to avoid any conflicts
  4. Import the data from the 5 tables defined above into the Ax database
  5. Now this is where we need to reset the record Id’s of Ax. To do so open SQL and run the following commands on the Ax database
    Update systemSequences Set nextval = (select max(RecId) + 1 from SYSVERSIONCONTROLMORPHXREV2543) Where tabid = 2543;
    Update systemSequences Set nextval = (select max(RecId) + 1 from SYSVERSIONCONTROLMORPHXITE2541) Where tabid = 2541;  
  6. After starting the AOS the version control should be restored

Update 26/10/2015: For 2012 application the table names are used in full and not terminated by the string limit


2 thoughts on “Backup and restore MorphX Version control

  1. Hi Sashi, I believe that the table SYSVERSIONCONTROLSYNCHRONI1982 (SysVersionControlSynchronizeLog in the AOT) is never used by the MorphX VCS? Can you confirm from your experience? Is it always empty?
    My understanding is that it’s used for TFS synchronisation…


    1. Hi Nathan. Yes you are correct that this table is never used when the Version control type is MorphXVCS and is used for TFS. Although i am not sure about it when the Version control type is VSS or source depot.


Leave a Reply / Comment

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s