SQL server connecting to SharePoint server - sql-server

I wish to connect SQL server 2012 to SharePoint server. This do complete SQL queries..what is the easy way to do so please?
I want to download data from a SharePoint table into SQL server table basically.
I can only find tutorials connecting SharePoint to SQL server. I want the other way around
Happy to do this via SSIS too..
Please help

There are three options to read from Sharepoint table:
(1) Using ODATA Components
You can use ODATA Source component to access to the Sharepoint Lists
Using the SSIS OData Source Connector with SharePoint Online
Using the OData Source in SQL Server Integration Services
Connecting to SharePoint from SSIS using OData Source
(2) Using Sharepoint List adapter
You can simply use the Sharepoint List adapter components which are an open source project created by SQL Server community within a project called MSSQL SSIS Community:
You can check the project page at the following link:
MsSQL SSIS Community
Or you can simply download the assemblies from the link below:
Project Releases
You can read more about this components in the following link:
Extracting and Loading SharePoint Data in SQL Server Integration Services
(3) Using third party components
KingswaySoft SSIS Integration Toolkit for Microsoft SharePoint
AxioWorks SQList

If you have Microsoft Access Database Engine 2010 Redistributable installed, you can use OPENROWSET command in a View.
I have created a View using OPENROWSET command. Below is the syntax I used, you need to replace the text enclosed in <> with your values:
SELECT * FROM OPENROWSET('Microsoft.ACE.OLEDB.12.0', 'WSS;IMEX=1;RetrieveIds=Yes;DATABASE=https://<tenant>.sharepoint.com/sites/<sitename>;LIST=<listID>;', 'select <columns list> from <list name as displayed in SharePoint>')
You will need SharePoint List ID that you can get easily by opening the list in browser and going to Settings, and checking the URL.. it is in format: {247c5fd8-32cd-4536-b1d0-e2e62845f174}. Please check this link.

Related

How to use Sharepoint REST API in SSIS

I am new to Sharepoint Online API and I would like to extract data from a Sharepoint list using a SSIS flow.
I tried to do this using OData Source, using the URL:
http://name.sharepoint.com/sites/l/_vti_bin/ListData.svc
but I am not able to see all the properties of list items.
So now I would like to try using the REST API:
http://name.sharepoint.com/sites/l/_api/web/lists.
but the issue is that this link is not working in SSIS.
Is there any possibility to do this using SSIS objects (not code)?
You can simply use the Sharepoint List adapter components which are an open source project created by SQL Server community within a project called MSSQL SSIS Community:
You can check the project page at the following link:
MsSQL SSIS Community
Or you can simply download the assemblies from the link below:
Project Releases
You can read more about this components in the following link:
Extracting and Loading SharePoint Data in SQL Server Integration Services

SSIS/SSDT plugin for Visual Studio 2017 - SharePoint Adapters

I have installed Sql Server Data Tools for Visual Studio 2017 and noticed that there are no SharePoint connections in the SSIS toolbox. I know I can read from a SharePoint list using the ADO connecter and save it off somewhere, but what I'm looking for is reading a file in, a csv file, and then being able to write that information into a SharePoint list. This is a work machine and so I can't use the CodePlex archive options or the Kingswaysoft adapters. I was wondering is the SharePoint adapters only a third party option or is there an out of the box solution within the SSIS options that I'm missing. I've got Visual Studio 2017 Professional as well as Sql Server Management Studio 2014. The Sql Server Data Tools are for Visual Studio 2017.
Sharepoint Data Flow Components
I don't think there is an official Destination Component for Sharepoint in SSIS. Since you are using SQL Server 2014, you can benefit from ODATA Source component to connect to Sharepoint. These components are found in the SQL Server 2014 feature pack.
Unfortunately, if you need to write to a Sharepoint list, you have to use a third party components such as :
SSIS Data Flow Source & Destination for OData
OData SSIS Components
Using SSIS to Automatically Populate a SharePoint List
COZYROC - SharePoint Destination
SSIS Integration Toolkit for Microsoft SharePoint
Workarounds
You can use a Flat File Destination to Store the result inside a flat file on local folder. Then you can add a Script Task that will be executed after the Data Flow Task. Then write a C# / VB.NET script to upload the file to Sharepoint using Microsoft.Sharepoint.dll assembly. You can refer to the following links for more information:
How to: Upload a File to a SharePoint Site from a Local Folder
Another thing to try, if you are not familiar with Script Task and you have a knowledge in Web Services, try to create a WebService to upload files to SHarepoint List and use a Web Service Task instead of Script Task:
Upload a Document to the SharePoint Document Library using a Webservice
Upload document from Local Machine to SharePoint Library using WebService

SSIS 2016 : What kind of connector do we have as a replacement for SharePoint list adapter

We have SharePoint list adapters used in older version of SSIS to get data in & out of sharepoint/SQL Server. In SQL Server 2016 we have OData (Connection Manager for OData) for accessing sharepoint, but I can see OData only available for Source, is there a OData component available for sharepoint target as well?
Any suggestion on how we can use sharepoint as both source & target in SSIS 2016 will be helpful.
Thanks,
Sathesh
SharePoint List Adapter is up and running. And now even better -> the project was migrated to GitHub and supports SQL 2017.
Please download the latest release via
https://github.com/fan130/mssql-ssis-community-samples/releases

synchronization between PL sql developer to sql server

I'd be happy if someone could help me.
I need to get data from PL sql developer oracle and import of sql server, I want to do automatic synchronization.
now I am exporting an Excel file from PL sql developer oracle, and load the file into sql server
The tool specifically built for this is Sql Server Integration Services (SSIS). You can create a data flow with source component using Oracle Driver and destination using Sql Server. You can even add transforms between the two to handle formatting and other tasks.
Here is a link to a series of videos on the topic. There is plenty of non - video materials as well if you prefer.
https://www.youtube.com/watch?v=LgB7zdyH0uI

How can I export data from SQL Server 2005 to a SharePoint list in batches?

I was told that this could be done by using SSIS. Can anyone refer me to the right tutorial?
Thanks. :)
Extracting and Loading SharePoint Data in SQL Server Integration Services
The SharePoint List Source and Destination Sample available on Codeplex provides an optimized solution with an easy-to-use interface for getting data out of or into a SharePoint list. The sample also includes an API for accomplishing these tasks efficiently outside of SQL Server Integration Services.
To download the adapters themselves, visit the Microsoft SQL Server Community Samples: Integration Services page on Codeplex.
To review the document, please download the Word document Extracting and Loading SharePoint Data in SQL Server Integration Services.

Resources