How to Import Dynamics 365 Data into SQL Server using SSIS



Easily back up Dynamics 365 data to SQL Server using the SSIS components for Dynamics 365.

Using SQL Server as a backup for critical business data provides an essential safety net against loss. Backing up data to SQL Server enables business users to more easily connect that data with features like reporting, analytics, and more.

This example demonstrates how to use the CData SSIS Tasks for Dynamics 365 inside of a SQL Server SSIS workflow to transfer Dynamics 365 data into a Microsoft SQL Server database.

About Dynamics 365 Data Integration

CData simplifies access and integration of live Microsoft Dynamics 365 data. Our customers leverage CData connectivity to:

  • Read and write data in the full Dynamics 365 ecosystem: Sales, Customer Service, Finance & Operations, Marketing, and more.
  • Extend the native features of Dynamics CRM with customizable caching and intelligent query aggregation and separation.
  • Authenticate securely with Dynamics 365 in a variety of ways, including Azure Active Directory, Azure Managed Service Identity credentials, and Azure Service Principal using either a client secret or a certificate.
  • Use SQL stored procedures to manage their Dynamics 365 entities - listing, creating, and removing associations between entities.

CData customers use our Dynamics 365 connectivity solutions for a variety of reasons, whether they're looking to replicate their data into a data warehouse (alongside other data sources)or analyze live Dynamics 365 data from their preferred data tools inside the Microsoft ecosystem (Power BI, Excel, etc.) or with external tools (Tableau, Looker, etc.).


Getting Started


Add the Components

To get started, add a new Dynamics 365 source and SQL Server ADO.NET destination to a new data flow task.

Create a New Connection Manager

Follow the steps below to save Dynamics 365 connection properties in a connection manager.

  1. In the Connection Manager window, right-click and then click New Connection. The Add SSIS Connection Manager dialog is displayed.
  2. In the Connection Manager type menu, select Dynamics365. The CData Dynamics 365 Connection Manager is displayed.
  3. Configure connection properties.

    Edition and OrganizationUrl are required connection properties. The Dynamics 365 connector supports connecting to the following editions: CustomerService, FieldService, FinOpsOnline, FinOpsOnPremise, HumanResources, Marketing, ProjectOperations and Sales.

    For Dynamics 365 Business Central, use the separate Dynamics 365 Business Central driver.

    OrganizationUrl is the URL to your Dynamics 365 organization. For instance, https://orgcb42e1d0.crm.dynamics.com

Configure the Dynamics 365 Source

Follow the steps below to specify the query to be used to extract Dynamics 365 data.

  1. Double-click the Dynamics 365 source to open the source component editor.
  2. In the Connection Manager menu, select the connection manager previously created.
  3. Specify the query to use for the data extraction. For example: SELECT GoalHeadingId, Name FROM GoalHeadings WHERE Name = 'MyAccount'
  4. Close the Dynamics 365 Source control and connect it to the ADO.NET Destination.

Configure the SQL Server Destination

Follow the steps below to specify the SQL server table to load the Dynamics 365 data into.

  1. Open the ADO.NET Destination and add a New Connection. Enter your server and database information here.
  2. In the Data access mode menu, select "table or view".
  3. In the Table Or View menu, select the table or view to populate.
  4. Configure any properties you wish to on the Mappings screen.

Run the Project

You can now run the project. After the SSIS Task has finished executing, your database will be populated with Dynamics 365 data.

Ready to get started?

Download a free trial of the Dynamics 365 SSIS Component to get started:

 Download Now

Learn more:

Dynamics 365 Icon Dynamics 365 SSIS Components

Powerful SSIS Source & Destination Components that allows you to easily connect SQL Server with Dynamics 365 through SSIS Workflows.

Use the Dynamics 365 Data Flow Components to synchronize with Dynamics 365 Leads, Contacts, Opportunities, Accounts, and more. Perfect for data synchronization, local back-ups, workflow automation, and more!