1

We need to import SharePoint Document Library (which could be holding multiple document in multiple formats) to a destination folder (on different server) using SSIS.

2

3 Answers 3

3

There are open source SSIS adapters available for SharePoint. You can use these.

http://sqlsrvintegrationsrv.codeplex.com/ http://sqlsrvintegrationsrv.codeplex.com/releases/view/17652

Sign up to request clarification or add additional context in comments.

Comments

1

You can also create a script task in ssis and use c# to extract files from SharePoint Library to a local folder. Make sure the SharePoint url only contains siteurl/Library/Folder/File (no special characters). Below copies one file but can be modified to copy multiple files. Good luck.

using System.net;


public void main ()
{
WebClient Client = new WebClient();
Client.UseDefaultCredentials = true;
Client.DownloadFile("yourSharePointurl/File.ext", 
@"YourLocalFolder/File.ext");
Dts.TaskResult = (int)ScriptResults.Success;
}

2 Comments

I tired this and it gives an error: "Exception has been thrown by the target of an invocation"
Same error for me as well Exception has been thrown by the target of an invocation - any solution?
0

Change this "using System.net;" to using "System.Net;"

My compilation error got fixed

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.