With the Cloud Connector Connection Manager (a MMC snap-in) you have to setup:
1. the connection (e.g. uni-directional or bi-directional, scheduling etc.),
2. the data source (your SQL database) and
3. the data destination (in SharePoint on-premise, SharePoint Online or Office 365. The list must be created manually before).
You can use auto mapping to connect the fields of both data entities by name or map fields manually.
See here for sample connection settings:
Fig.: Sample SQL to Office 365 bi-directional connection.
- Bi-directional connections require appropriate access rights on database. Use uni-directional connections if you want to push SQL data only to the cloud.
- Please enable scheduling later on, when all settings are verified and you have an idea of replication duration. Duration time depends on bandwidth, performance of source and destination, and number of fields and records in SQL. Only changes are transferred later on.
Before running the connection, you have to define the data source and destination.
Fig.: The pre-installed SQL Provider is used to connect to the data source with a connection string.
- Select the SQL Provider that fits to your database. If it's not in list, it must be installed. Take care about 64-Bit and 32-Bit. The Cloud Connector can run in both modes, but it can connect only to those providers, that fits.
- Enter a valid connection string for your database system. See www.connectionstrings.com to know.
- The provider offers the possibility to enter direct queries, depending on database system. Select as few fields as required to increase performance.
- For most systems you can use aliases in field names to fit to your SharePoint Online list, e.g. Select Productname as Title from products.
- Use the data preview to check out the result of your query.
- For most systems a "primary key" is set automatically.
- Please verify all settings before save.
Next you have to define your data destination:
Fig.: Data destination sample, a list "Products" in the Office 365 cloud.
- Use the Layer2 SharePoint CSOM Provider to connect to SharePoint on-premise, SharePoint Online or Office 365.
- You have to create the destination list manually with all columns required to host your query data.
- Read more about connection strings to connect to Office 365, SharePoint Online or SharePoint on-premise here. Please note that you can connect to any other type of data destination, e.g. to other SQL databases.
- There is no need to enter a primary key, the provider automatically uses the SharePoint item ID.
As a last step you have to setup the column / field mapping. You can use the auto-mapping feature (by field / column names) or map manually.
Fig.: Sample field / column mapping of data source and data destination.
- Please note the mapping of ProductName to Title, as SharePoint required a Title field.
- In this case we have included the SourceID to have a clear reference to the original record.
That is not a requirement, but advised as best practice.
- Please note the difference in data types. The Cloud Connector tries to match as close as possible.
If all settings are verified, please go to connection root and run the connection manually first. Please note, that it could take some time to transfer all nodes. You can take a look in your cloud list to see how it goes on.