web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Synchronization between servers

(0) ShareShare
ReportReport
Posted on by

Hi!

I am starting a new project and I want to create the best possible workflow of server synchronization...

This is my concept: LIVE, BUILD, TEST, DEV1, DEV2, DEVx

LIVE - is server instance which has working and good tested projects.

  • Synchronization (to LIVE) of model layer will be done by creating full model backUP from BUILD and install it on LIVE

BUILD - is server which has new working and good tested project, ready to deploy.

  • Synchronization (from BUILD) of model layer will be done by creating full model backUP from BUILD and install it on TEST
  • Synchronization (to BUILD) of model layer will be done by export particular project (*.xpo) from TEST and import it on BUILD. 
  • The DB will be update by export whole DB from LIVE and import on BUILD

TEST - is server which is as much up-to-date (similar to BUILD) as it's possible. Finally tests before deploying BUILD.

  • Synchronization (from TEST) of model layer will be done by creating full model backUP from TEST and install it on DEVx
  • Synchronization (to TEST) of model layer will be done by export particular project (*.xpo) from DEVx and import it on TEST. 
  • The DB will be update by export whole DB from BUILD and import on TEST

DEVx - is server which is as much up-to-date (similar to BUILD) as it's possible. Finally tests before deploying BUILD.

  • Synchronization (from DEVx) of model layer will be done by export particular project (*.xpo) from DEVx and import it on TEST. 
  • The DB will be update by export whole DB from TEST and import on DEVx

We use AX2012 so i will be backuping model layer using PS Export-AXModel and Install-AXModel command

The DB will be exported from one server to another...

Is there any other, better solution to create a workflow ??

Or maybe there is better solution to move model layer or DB between servers ??

*This post is locked for comments

I have the same question (0)
  • Verified answer
    Vilmos Kintera Profile Picture
    46,149 on at

    You are doing this incorrectly, forget layers.

    An AX model does not contain OriginId/Element Id. You want to make sure that the OriginId and Model ElementIds are the same between the Build and Production environment.

    I typically go with this layout:

    Dev (1 for each developer, no data, Dev TFS branch /branched off from the main Prod branch/), Build4Test (no data, Dev TFS branch/), Test, Build4Prod (no data, Prod TFS branch), Quality Assurance, Production

    QA and Test is initially a full backup/restore of Production DBs, while build and dev only needs to have the modelstore imported, and must have the same License information / Configuration.

    Developers would manually merge their code which are (fully or partially) ready with XPOs into Build4Test. The code is compiled, synched on Build4Test, modelstore is taken into Test based on your schedule, where in progress developments could be verified with data.

    Once a code is matured enough, you would merge the TFS Dev branch to TFS Production in Visual Studio. On Build4Prod, you have to do a Version control Synchronize in AX to import the changes from the TFS repository.

    The automated/manual TFS build process on Build4Prod would result in a modelstore. You could release that into QA and verify if everything works OK and do all final testing there for to-be-released code. Once that has passed, you could release the same modelstore into Production.

    You could come up with your own schedule like when to refresh the full database from Production back to QA (typically daily or weekly) and Test (every couple of months). QA is a good candidate for debugging and reproducing issues that you normally should not do in Production, so keeping a fresh copy is always useful. Test could be older and have it's own ElementIds, it does not matter. Only the checked in/merged code is important which you synch in Build4Prod.

    With this setup your code would always be up-to-date in Build4Prod, QA and Production, and is version controlled so if something went wrong with a release, you could roll back to a previous stable stage. Also you have an additional verification layer / safety net, before releasing something incorrect into Production. Developers would not be checking in anything that is half-baked, and XPO merge would not make Test system unavailable half the day due to waiting for developers. Using modelstores is much faster, a typical automated build is 2 hours tops, and a release is around 1 hour maximum.

    This is one of the many designs you could do, and I can assure this already works like clockwork for medium to large enterprises already.

  • Community Member Profile Picture
    on at

    I haven't even thought about TFS to be honest...

    To summarize what you and i wrote... DB synchro by import/export is fine ?? There won't be any problem with recId or etc ??

    You mentioned that Export-AXModel and Install-AXModel does not contain OriginId/Element Id... Could you explain it a little bit more ?? Because i'm quite new develepoer and does not see a dangerous...

    If i decided to use TFS... all migration between servers (Classes, Tables, Enums, EDT, Jobs, basicly all thing that i'll do in AX) will be possible to deploy in both directions ??

  • Suggested answer
    Vilmos Kintera Profile Picture
    46,149 on at

    Refer to the Important box at the bottom for element IDs, and to the linked article as well "Maintaining Installation-Specific Element IDs and Element Handles":

    technet.microsoft.com/.../hh335184.aspx

    Not sure what you mean by import/export. Modelstore contains compiled X++ p-code and .Net CIL, and their ElementIDs per installation, so that ensures your Production elements are coming from Build, which is then replicated from time to time to QA and Test.

    I am unsure what you mean by RecIds. When you move a whole database, then a whole database is replaced including RecIds. If you use axutil for the modelstore release, that will drop the previous code and fully replace it with the new release in the file.

    TFS is an option that you should not even consider avoiding, without that you cannot work in an efficient manner and you have no traceability for tracking what has changed, and you cannot fall back to previous versions neither. With TFS you cannot "deploy" in a sense you mean, but you could create automated builds which produce the modelstore file. Microsoft has examples for this which you could find online too.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans