It's easy to connect a Windows Azure database table to native SharePoint lists in Office 365, SharePoint Online or any other SharePoint 2010 sandbox.
In our scenario we want to provide links to documents in Windows Azure in a SharePoint link list in Office 365.
Steps to connect:
First you have to create the SQL Azure table like this:
Fig.: Creating a SQL Azure table to host the document link information.
As a next step you have to create a Links list in your Office 365 or SharePoint Online. Use the Links template for this.
As a next step you can connect both data entities using the Cloud Connector for one-way replication. You have to provide a connection definition similar to the following:
<?xml version="1.0" encoding="utf-8" ?>
interval="60" version="1.2" enabled="true">
selectStatement="Select *, docLink + ';#' + docName as SPURL from DocLinks"
connectionString="Data Source=https://myserver.sharepoint.com/sites/mysite/; Initial Catalog=AzureDocLinks; Authentication=Office365; User Id=myUser@MyDomain.onmicrosoft.com;Password=MyPassword;"
<field entity="AzureSource" name="SPURL"/>
<field entity="Office365Destination" name="URL" />
<field entity="AzureSource" name="docDescription"/>
<field entity="Office365Destination" name="Notes" />
- The System.Data.SqlClient provider has to be installed on the server or client computer, where the Cloud Connector runs.
- Please make shure that SQL Azure can be reached from the Cloud Connector computer using it's ports 1433/1434. There are different ways to do this, e.g. open in firewall, using a port bridge etc.
- The URL column of the "AzureDocLinks" Links list is of type URL. To provide the link as usual with link url and link text you have to use the notation "link;#text". That's why the SQL query creates a SPURL field during runtime. The Azure SPURL field is mapped to the SharePoint URL column in the mapping section of the connection definition file.
Fig.: The URL field in SharePoint consists of link and description.
- You need a primary key on the Azure side. Here as a sample the URL itself is used, but you can use any other as well.
- In this sample the content is replicated one way only (Azure to O365) every hour.
- SQL Azure data can be used with Office 365, SharePoint Online or any other SharePoint 2010 in native SharePoint lists.
- All SharePoint list features are available for SQL Azure data, e.g. notifications and workflows on external data change (e.g. linked document changes in this sample).
- You can use Azure to store documents that can be linked in Office 365, SharePoint Online or any other SharePoint 2010.
- More general benefits see the Cloud Connector product page.
In this sample an unidirectional connection is used. Generally SQL Azure tables can be connected bi-directional to native SharePoint lists as well.