Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM forum
Answered

Best practices with refreshing test environment with production database

Posted on by 264

Hi, we are preparing to restore a database from production environment to our test environment and I need answers to a couple of questions:

1. Do we only have to restore OrgName_MSCRM database or MSCRM_CONFIG (msdb? others?) databases? In which cases would I restore just org db and in which others?

2. Could any components (beside URLs in scripts and plugins) point to production environment? E-mail router for eksempel? What pre-steps should we take?

3. Do we have to reimport organization?

4. Should we stop CRM web site in IIS and some services?

Thanks in advance

  • AlexSmith228 Profile Picture
    AlexSmith228 5 on at
    RE: Best practices with refreshing test environment with production database

    Hello, if you have questions about how best to make a project or database and the like, then I know good specialists who can solve your problems, here is design and development agency , they are just dealing with such issues. Perhaps it can be useful to you.

  • Kobus@Cedar Profile Picture
    Kobus@Cedar 10 on at
    RE: Best practices with refreshing test environment with production database

    Hi All

    Another very important point to note before removing an Organization is to copy/backup the Data Encryption Key under Data Management, if ever you need to restore the current DB, some functionality will not work until you add the correct data encryption key.

    Also, once the prod DB is restored in dev/qa/etc, make sure that any processes/workflows that would send comms out is deactivated or that the data is updated to only send to test contact detail.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Best practices with refreshing test environment with production database

    welcome

  • otoolepw Profile Picture
    otoolepw 10 on at
    RE: Best practices with refreshing test environment with production database

    Thank you Sebastien, this worked perfectly.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Best practices with refreshing test environment with production database

    Hi, we just did reimport organization and CRM to sharepoint integration stopped working. how could we fix it? 

    We used server to server authentication (CRM 2016 sp1 on prem+Sharepoint 2013 on prem)

    Thanks in advance.

  • Verified answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Best practices with refreshing test environment with production database

    On test application server, you have to delete the organization

    On test database server, you have to drop the database and restore the backup of production.

    After you have to import the organization like describe in the referencing page, map users (different between production and test environnement) and Specify Reporting Services Server.

  • Žarko Radevic Profile Picture
    Žarko Radevic 264 on at
    RE: Best practices with refreshing test environment with production database

    I have seen the page you are referencing, but can you explain why do I have to do it that way? I tested in a demo environment, I could just restore the database without dropping organization in deployment manager and didn't drop the database, but it was just a simple demo environment...

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Best practices with refreshing test environment with production database

    Hi,

    I recommend to delete existing database.

    In order :

    1) Export all solutions you are working on dev that are not deployed on prod.

    2) If you have an entity with parameter wich differ by environnement, don't forget to export them et re import at the end.

    3) Deactivate the test Microsoft Dynamics CRM organization

    4) Delete the test Microsoft Dynamics CRM organization in Deployment Manager

    5) Drop the test MSCRM database

    6) Restore the backup of the production MSCRM database

    7) Import the organization to the test environment

    => blogs.msdn.microsoft.com/.../best-practices-for-refreshing-a-microsoft-dynamics-crm-test-environment

  • Žarko Radevic Profile Picture
    Žarko Radevic 264 on at
    RE: Best practices with refreshing test environment with production database

    Thank you for your answer.

    I am just not sure if I have to use the "import organisation" in deployment manager after restore. I restore on existing database in test environment. Do you recommend to delete existing database before restore? I also asked if I have to disable all windows services like async, sandbox and others (maybe not important)?

  • Suggested answer
    ScottDurow Profile Picture
    ScottDurow 50,170 on at
    RE: Best practices with refreshing test environment with production database

    You should take a database backup of only the MSCRM organisation database and not the CONFIG database - then use the deployment manager 'import organisation' option once it is restored on the test SQL server.

    The email router config is local and will not come with the database. You will need to be careful if you have server side sync or share point integration enabled. Also if there any external system integrations then these too should be disabled.

    Hope this answers your question?

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

Anton Venter – Community Spotlight

Kudos to our October Community Star of the month!

Announcing Our 2024 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Dynamics 365 Community Newsletter - September 2024

Check out the latest community news

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,570 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 228,683 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans