• subscribe
April 22, 2009 12:00 AM

Integrating SharePoint Data with SQL Server

SQL Server Integration Services transforms data
SQL Server Pro
InstantDoc ID #101656


LISTING 3: XML Schema

<xs:schema xmlns:ns1="#RowsetSchema" attributeFormDefault="unqualified" elementFormDefault="qualified"
targetNamespace="#RowsetSchema" xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xs:element name="data"> <xs:complexType> <xs:sequence> <xs:element minOccurs="0" maxOccurs="unbounded" name="row"> <xs:complexType> <xs:attribute name="ows_Title" type="xs:string" use="optional" /> <xs:attribute name="ows__ModerationStatus" type="xs:unsignedByte" use="optional" /> <xs:attribute name="ows__Level" type="xs:unsignedByte" use="optional" /> <xs:attribute name="ows_EventDate" type="xs:string" use="optional" /> <xs:attribute name="ows_AVMStatus" type="xs:string" use="optional" /> <xs:attribute name="ows_ID" type="xs:unsignedByte" use="optional" /> <xs:attribute name="ows_owshiddenversion" type="xs:unsignedByte" use="optional" /> <xs:attribute name="ows_UniqueId" type="xs:string" use="optional" /> <xs:attribute name="ows_FSObjType" type="xs:string" use="optional" /> <xs:attribute name="ows_Created" type="xs:string" use="optional" /> <xs:attribute name="ows_AVMAbsenceType" type="xs:string" use="optional" /> <xs:attribute name="ows_EndDate" type="xs:string" use="optional" /> <xs:attribute name="ows_Employee_x0020_Name" type="xs:string" use="optional" /> <xs:attribute name="ows_FileRef" type="xs:string" use="optional" /> <xs:attribute name="ows_MetaInfo" type="xs:string" use="optional" /> <xs:attribute name="ows_Description" type="xs:string" use="optional" /> <xs:attribute name="ows_fAllDayEvent" type="xs:unsignedByte" use="optional" /> </xs:complexType> </xs:element> </xs:sequence> </xs:complexType> </xs:element> </xs:schema>

LISTING 4: SQL Script to Create a Destination Table

USE [AdventureWorks]
GO
CREATE TABLE [dbo].[Absences](
  [ID] [int] IDENTITY(1,1) NOT NULL,
  Integrating SharePoint Data with SQL Server [nvarchar](255) NOT NULL,
  [EmployeeName] [nvarchar](255) NULL,
  [AbsenceType] [nvarchar](255) NULL,
  [StartDate] [datetime] NULL,
  [EndDate] [datetime] NULL,
  [Description] [nvarchar](255) NULL
) ON [PRIMARY]
GO


ARTICLE TOOLS

Comments
  • Mama
    2 years ago
    Sep 18, 2010

    It is truely disappointing that when I click on the List 1 link to the required code, it takes me to the beginning of the article...I've learned my lesson...I won't shop for information on this site again.

  • Peev
    2 years ago
    Jun 08, 2010

    If you can use third-party solutions, check the commercial CozyRoc SharePoint integration. These are the relevant components:

    * SharePoint Source SSIS Data Flow Component http://www.cozyroc.com/ssis/sharepoint-source
    * SharePoint Destination SSIS Data Flow Component http://www.cozyroc.com/ssis/sharepoint-destination
    * SharePoint SSIS Connection Manager http://www.cozyroc.com/ssis/sharepoint-connection

    Batch insert and update is also supported.

  • rodney
    3 years ago
    Sep 22, 2009

    Is this SSIS package accessing the SharePoint list via wcf webservice? We are using Microsoft online to host are SharePoint environment. For data access they say no access to data via SSIS. But we can access via WCF/Web Service Interface. Please advise

  • Allan
    3 years ago
    May 03, 2009

    Another approach that's quite a bit easier as well as more robust is my company's open source project SLAM. SLAM, SharePoint List Assocation Manager (http://slam.codeplex.com), allows you push list data to SQL as well but it sychronizes the data in real time (not batch) and additionally allows you to model complex joins (one to one, one to many, many to many).

    We have a brief intro video here: http://www.awsystems.com/slam.

    Yours,

    Allan

You must log on before posting a comment.

Are you a new visitor? Register Here