Discover how a bimodal integration strategy can address the major data management challenges facing your organization today.
Get the Report →Connect SharePoint to SQL Server through SSIS
Using SQL Server as a backup for critical business data provides an essential safety net against loss. In addition, backing up data to SQL Server enables business users to more easily connect that data with features like reporting, full-text search, analytics, and more.
This example demonstrates how to use the SharePoint ADO.NET Data Provider inside of a SQL Server SSIS workflow to transfer data directly from SharePoint and/or SharePoint Online into a Microsoft SQL Server database. The exact same procedure outlined below can be used with any CData ADO.NET Data Providers to connect SQL Server directly with remote data via SSIS.
- Open Visual Studio and create a new Integration Services Project.
- Add a new Data Flow Task from the Toolbox onto the Control Flow screen.
- In the Data Flow screen, add a DataReader Source and an OLE DB Destination from the Toolbox.
- Add a new Data Connection, and select your provider as .NET Providers\CData SharePoint Data Provider.
- In the connection manager, enter the connection details. This example uses a SharePoint blog page.
- Open the DataReader editor and set the following information:
- ADO.NET connection manager: In the Connection Managers menu, select the Data Connection you just created.
- Data access mode: Select 'SQL command'.
- SQL command text: In the DataReader Source editor, open the Component Properties tab and enter a SELECT command, such as the one below:
SELECT * FROM Posts
- Close the DataReader editor and drag the arrow below the DataReader Source to connect it to the OLE DB Destination.
Open the OLE DB Destination and enter the following information in the Destination Component Editor.
- Connection manager: Add a new connection. Enter your server and database information here. In this example, SQLExpress is running on a separate machine.
- Data access mode: Set your data access mode to "table or view" and select the table or view to populate in your database.
- Configure any properties you wish to on the Mappings screen.
- Close the OLE DB Destination Editor and run the project. After the SSIS Task has finished executing, your database will be populated with data obtained from SharePoint.
SSIS Sample Project
To get started using the SharePoint Data Provider within SQL Server SSIS, download the fully functional sample project.
Note: Before running the demo, you will need to change your connection details to fit your environment.
CodeProject