Importing data into a Microsoft CRM database
By Jürgen Beck
You can easily import leads and contacts by using the Microsoft CRM import tool found on the Tools menu. You can import all other objects by using the Data Migration Toolkit. You can find the Data Migration Toolkit on your Microsoft CRM CD, in the MSDN Subscriber Downloads, or in the Microsoft Action Pack Subscription.
To import data, follow these steps:
1. | Create the Common Database Format (CDF) database. Load the data you want from your Microsoft CRM database into the CDF database by using the Microsoft.Crm.DataMigration.InitializeCDF.exe tool. |
2. | Import your data (which can be data from your custom application) into this CDF database. Use the stored procedures in the CDF database to help you with this task. See the below table for an explanation of the various stored procedures. |
3. | Load the data from the CDF database into the Microsoft CRM database by using the Microsoft.Crm.DataMigration.CDFMigrationTool.exe tool. |
Stored Procedure | Functionality |
P_cdf_ListUnmappedUsers | Lists any user names from the OwningUserName or SalesRepIDName attributes in the entity base tables that do not have associated OwningUser or SalesRepId values that match SystemUserId values in the cdf_SystemUser table. |
P_cdf_MapUser | Associates a source user name with the user name employed in Microsoft CRM. This data is stored in the SourceUserName attribute of the cdf_SystemUser table. |
P_cdf_PopulateStringMap | Maps all drop-down list data from your entity tables into the cdf_StringMap table. |
For more information on this process, see the Data Migration Framework documentation.
Jürgen Beck is a Microsoft Certified Professional (MCP), Microsoft Certified Solution Developer (MCSD) for Microsoft .NET, Microsoft Certified Database Administrator (MCDBA), Microsoft Certified Systems Engineer (MCSE), and Microsoft Certified Trainer (MCT). He is also certified in Microsoft CRM application, installation, and customization and is a Microsoft MVP for Visual C#. He lives in Germany