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 CRM (Archived)

Copying "production" organization to "sandbox" organization

(0) ShareShare
ReportReport
Posted on by

I've started a new job and noticed that there is a sandbox organization set up, but no one knew it was there. I would like to copy our production data into it and use it as a test environment (since right now testing is being done in production).

It seems Dynamics CRM 2016 (on prem) does not support copying organizations to sandbox like the online version does, I found instructions that said it was as simple as:

- Copy production SQL database with new name

- Run SQL script on new database to reset organization ID (2016 version at bottom: https://social.microsoft.com/Forums/en-US/b8dfb946-bb02-4fb9-a92f-22ffb8b7071c/crm-2011-import-organization-on-the-same-server-or-how-do-you-create-a-development-sandboxes?forum=crmdeployment)

- Import organization and select copied database

Now I haven't seen or touched Dynamics CRM until last week, so I'm not really familiar with the back end. Is _all_ data about an organization solely kept in the database, there isn't any other files that need to be copied? Is there a better way to do this?

Thanks

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Michel van den Brink Profile Picture
    4,697 on at

    Hello Neostim,

    Yep, that's all there is to it. All data for a single Dynamics CRM organization is kept in the one database, typically called "OrganizationName_MSCRM"

    If you make a copy of that one and use the "Import" feature in the Deployment Manager onprem, you've successfully copied the entire organization.
    Changing the organization ID is a smart move to make sure Dynamics doesn't get confused down the line but, it's technically not required.

     

    The MSCRM_CONFIG database keeps track of all the organizations, their IDs and their database names in SQL.

     

    Hope this answer your question.

    If you found my answer helpful, please help the community by marking it as such/verifying it :-)

  • Verified answer
    a33ik Profile Picture
    84,331 Most Valuable Professional on at

    Hello,

    No scripts are needed actually. Here are steps I was doing to move prod to test:

    1. Take a backup of prod.

    2. Restore a backup to other (test) DB.

    3. Import organization from backup using Deployment Manager - technet.microsoft.com/.../dn905200.aspx

  • Community Member Profile Picture
    on at

    Two follow up questions, if you don't mind.

    1) Is there a way to see what database the organization is currently using (without disabling it)? There is a few databases, probably from older versions/years ago so I want to make sure I copy the correct one

    2) If I don't run the script, what kind of issues could happen down the line?

    Thanks!!

  • Verified answer
    a33ik Profile Picture
    84,331 Most Valuable Professional on at

    Run following query against MSCRM_Config database to find what DBs are in use:

    Select

    DatabaseName

    ,FriendlyName

    ,UniqueName

    From Organization

    Script was too scary for me to run and even to read. Believe me - there is absolutely no need to run any queries to import any organization. Just use Deployment Manager.

  • Suggested answer
    Michel van den Brink Profile Picture
    4,697 on at

    1. Yes, OnPrem the unique organization should name is always in the URL, this corresponds to the unique organization name you can find in the Deployment Manager or the MSCRM_CONFIG database.

    If you are navigating to CRM without the unique organization name is the URL, CRM will pick the first one available, based on the creation date of the organization.

    2. Nothing major, there's some actions in the Deployment Manager that will behave a little funky because it's seeing two organizations with the same ID but, nothing you can't overcome by temporarily disabling one.

  • Community Member Profile Picture
    on at

    Thank you both very much! On to copy the organization :)

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 CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans