D365 Finance & Operations and Dynamics AX Forum

Expand all | Collapse all

Refresh test database before or after code promotion to production

  • 1.  Refresh test database before or after code promotion to production

    Posted Mar 12, 2021 05:04 PM
    Hi everyone,

    I have a question regarding the sequence of events for a weekend database refresh / code promotion operation via LCS. Our organization promotes custom code packages to our production environment every Sunday morning at 2:00am. The code package is first applied to our tier-2 test environment and signed off before scheduling promotion to production for Sunday morning. Over the weekend, I also refresh the test environment database from production.

    My question is: Should I refresh the test database on Saturday during the day or Sunday after the code promotion?
    On Saturday, the production environment does not yet have any potential tables/fields/entities created by the code package. The production and test databases do not yet match. By refreshing the test environment from production on Saturday, am I wiping out tables/fields/entities in the test database?

    Or am I okay to do it on Saturday because the LCS refresh operation does a database synchronization and will re-create those fields/tables etc? The data itself is not the issue - I just want to know if the schema will match.

    I would also like to know if there is a way to view the logic behind the LCS Refresh / Export operations so I can get a better understanding of what exactly is happening.

    Currently running D365FO - 10.0.13 - PU37

    Thank you very much for your input!


    ------------------------------
    Tim Khan
    D365 System Administrator/Analyst
    DATA Communications Management Corp
    Brampton, ON, Canada
    ------------------------------


  • 2.  RE: Refresh test database before or after code promotion to production

    GOLD CONTRIBUTOR
    Posted Mar 15, 2021 09:06 AM
    Hi Tim,
    The DB refresh is followed by DB synchronization, so you would be fine running it before the code promotion.
    But I don't know how to peek into the logic behind LCS operations.

    ------------------------------
    Steeve Gilbert
    Software Development Supervisor
    Boa-Franc S.E.N.C.
    QC, Canada
    ------------------------------



  • 3.  RE: Refresh test database before or after code promotion to production

    Posted 30 days ago
    Hello Steeve,

    Thank you very much for confirming that a database synchronization takes place. This definitely allows for flexibility in my process. Thanks for your input!

    -Tim

    ------------------------------
    Tim Khan
    D365 System Administrator/Analyst
    DATA Communications Management Corp
    Brampton, ON, Canada
    ------------------------------



  • 4.  RE: Refresh test database before or after code promotion to production

    SILVER CONTRIBUTOR
    Posted Mar 16, 2021 06:20 AM
    Refresh from PROD is not allowed when MS code versions are at different levels and LCS should prevent you doing a refresh that is invalid. However, I would advise only performing a refresh from PROD with equivalent code levels to be truly confident.

    It is for things like this that we maintain two Tier-2 envs, one is for dev and MS code upgrades and the other is always in sync with PROD so that any support issues can be investigated with a quick refresh from PROD. I personally do not see how MS can expect any customer to exist with just one T2 env.

    ------------------------------
    Jonathan Howe
    IT Manager
    Cross Manufacturing
    Bath, UK
    ------------------------------



  • 5.  RE: Refresh test database before or after code promotion to production

    Posted 30 days ago
    Hi Jonathan,

    Thanks for your input here. I agree, it does seem like having a second tier-2 environment that is a copy of production is beneficial. I have heard these referred to as staging or preprod environments. Adding on a new tier-2 environment can be expensive (especially when compared to the cost of running our own cloud hosted Azure VM). But it seems that there are justifications for having such an environment, and my database refresh/export operation is one of them.


    ------------------------------
    Tim Khan
    D365 System Administrator/Analyst
    DATA Communications Management Corp
    Brampton, ON, Canada
    ------------------------------



If you've found this thread useful, dive deeper into User Group community content by role