…
Summary
This white paper provides an overview and a detailed view of pitfalls making painful a data migration related to Dynamics 365 or Dynamics CRM. Regardless the type of data migration (migration to Dynamics online or migration to Dynamics On-Premises), native and custom items could delay the data migration process. Those items should be categorized into 5 groups: data context, platform context, functional context, code context, architecture context.
Keywords
Data Migration, D365, Dynamics 365 On-Premises, Dynamics CRM On-Premises, Orchestration, Guide, Ordering, Prioritization, Grouping, Reporting, Logging, Tables, Attributes, Columns, Entities, Data Model, Customer Data Model, Activity Data Model, Custom Entities, System Entities, Core Data Model, Security Data Model, Internal System Process, Sequencies, Validation.
Confidentiality
The white paper does not provide any confidential client data related to data migration. All the code in this white paper is only related to the CRM SDK365 code.
INTRODUCTION: MIGRATION CONTEXT
Data Migration options
Without emphasizing the technical aspect of an option, in this case, whether it is a "Cloud" technology (cloud technology) or an "on Premise" technology, there are two execution contexts:
OPTION | DATA SOURCE | DATA DESTINATION | DESIGN OF SCENARIO |
TYPE A | DATABASE (DB) | DATABASE (DB) | DB/DB |
TYPE B | DATABASE (DB) | SERVICE | DB/SERVICE |
Data migration options applied to Dynamics CRM
Emphasizing the technical aspect of an option, what does it mean regarding the platform Dynamics CRM or Dynamics 365?
OPTION | DATA SOURCE | DATA DESTINATION | DESIGN SCENARIO | DYNAMICS 365 |
TYPE A | DATABASE | DATABASE | DB/DB | FROM DYNAMICS ON-PREM TO DYNAMICS ON-PREM |
TYPE B | DATABASE | SERVICE | DB/SERVICE | FROM DYNAMICS ON-PREM TO DYNAMICS ON-LINE |
Pitfalls of a data migration
A data migration focuses on the movement of data between source (legacy data system and business) and destination (target system). However, pitfalls related to the CRM data context are real and can delay the data migration: data related to security model, data related to shared data, data model related to denormalization, data logs and audit and finally, data volume.
Even with the most thoroughly tested tools and procedures, we need to ask ourselves how to orchestrate a data migration, mainly from database to database.
1. PROBLEM: HOW TO ORCHESTRATE THE DATA MODEL
Here is the opportunity to orchestrate a data migration code related to Dynamics 365. So, we need to have a guide helping us to develop the right, accurate and structured code regarding the data model.
The questions raised by this problem could be challenging: How to group the entity model? What is the sequence of execution? How to prioritize the entities? How to exclude the unnecessary entities to migrate? Our guide could help to organize and structure the data migration and in so doing, we could establish the right requirements to fulfill.
2. REQUIREMENTS RELATED TO THE ORCHESTRATION
2.1 Requirements related to Database SQL as migration tool
First, we need to create at least 3 databases: a « source » database (Dynamics 365); a « target » database (Dynamics 365) and finally, a « tool » database we could call « CRM Tool ».
2.2 Requirements related to organization of entities.
Here is the opportunity to define our strategy and actions related to grouping, prioritizing and excluding entities in the process.
3. DATA PREPARATION: BEFORE DATA ORCHESTRATION
Here is the first steps to fulfill before migrating our data and orchestrating our data model management.
3.1 START THE DATA PREPARATION
Initialization of the logging table in the database “CRM Tool”
Initialization of the backup repository: repository will contain all the backups
Cleaning and initialization of the reporting statement in the database “CRM Tool”
Deploy the new customization to update the native data model of the new CRM organization: it will add the custom entities to the system entities and potentially update the relationships.
3.2 VARIABLES INITIALIZATION
Initialization of the following variables: identifier of the “Organization” entity, identifier of the “Solution” entity, identifier of the “Business Unit” entity, identifier of the “System User” entity.
Complete the identifier “System User” with its properties and the “User Settings” entity.
3.3 PREPARING CRM SECURITY MODEL
Update the following entities in the new database (target): System User, Business Unit, Team.
Complete the update with the following entities: organization, solution if needed.
3.4 END THE DATA PREPARATION
Handle the indexes of the “target” database, executing a SQL command to disable the indexes.
Logging the preparation in the database “CRM tool”.
Create the backup of the preparation: “PREPARATION BEFORE DATA ORCHESTRATION”.
4. CORE MODEL DATA ORCHESTRATION: WAVE 0
Implement a strategy of grouping and ordering the entities to orchestrate in order to prioritize the last ones. It will help to accelerate the development, the deploiement and the validation of the migrated data.
SEQUENCE | ACTIONS |
---|---|
SEQUENCE 1 |
|
SEQUENCE 2 |
|
SEQUENCE 3 |
|
SEQUENCE 4 |
|
SEQUENCE 5 |
|
SEQUENCE 6 |
|