Home > SQL Integration Services > How to use SSIS to extract permission assigned to each folder within a SharePoint List – Part 2 (of 5)

How to use SSIS to extract permission assigned to each folder within a SharePoint List – Part 2 (of 5)

Basically, I create 2 tables: “SharePoint_FolderList” and “SharePoint_FolderPermissionList”.

CREATE TABLE [dbo].[SharePoint_FolderList](

      [SP_FolderName] [nvarchar](100) NOT NULL,

      [SP_FolderPath] [nvarchar](350) NOT NULL

)

 

CREATE TABLE [dbo].[SharePoint_FolderPermissionList](

      [SP_FolderName] [nvarchar](100) NOT NULL,

      [SP_FolderPath] [nvarchar](350) NOT NULL,

      [SP_FolderPermission] [nvarchar](100) NOT NULL

)

There are a few steps in the SSIS package:

Steps 1 – Truncate the above2 tables

Steps 2 – Write the folder list to the staging table (SharePoint_FolderList)

(Thanks to Shantha Kumar’s Retrieve all folders with sub-folders from SharePoint List. I took his code to retrieve folder list.)

As I run the package on MOSS Server locally, I use SPWeb. (If you want to run the package remotely to the MOSS Server, you have to modify my code to use the SharePoint web services. Check “Retrieving folders from document library”: http://social.msdn.microsoft.com/Forums/en-US/sharepointdevelopment/thread/16a2d993-2f5e-4242-8e5a-451a78c064a3). In the script component, add the reference to “Microsoft.SharePoint” and add the following line: using Microsoft.SharePoint;

Advertisements
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: