Implementing Business Data Connectivity in SharePoint 2013


Business Data Connectivity

Business Connectivity Services is a centralized infrastructure in SharePoint 2013 and Office 2013 that supports integrated data solutions. With Business Connectivity Services, you can use SharePoint 2013 and Office 2013 clients as interfaces into data that doesn’t live in SharePoint 2013 itself. For example, this external data may be in a database and it is accessed by using the out-of-the-box Business Connectivity Services connector for that database. Business Connectivity Services can also connect to data that is available through a web service, or data that is published as an OData source or many other types of external data. Business Connectivity Services does this through out-of-the box or custom connectors.

External Content Types in BCS

External content types are the core of BCS. They enable you to manage and reuse the metadata and behaviors of a business entity, such as Customer or Order, from a central location. They enable users to interact with that external data and process it in a more meaningful way.

For more information about using external content types in BCS, see External content types in SharePoint 2013.

How to Connect With SQL External Data Source

Open the SharePoint Designer 2013 and click on the open site icon:

opensite

opensite

Input the site URL which we need to open:

open site url

open site url

Enter your site credentials here:

credential

credential

Now we need to create the new external content type and here we have the options for changing the name of the content type and creating the connection for external data source:

SharePoint Designer

SharePoint Designer

And click on the hyperlink text “Click here to discover the external data source operations, now this window will open:

Add Connection

Add Connection

Click on the “Add Connection “button, we can create a new connection. Here we have the different options to select .NET Type, SQL Server, WCF Service.

Select Connection

Select Connection

Here we selected SQL server, now we need to provide the Server credentials:

Server Credential

Server Credential

Now, we can see all the tables and views from the database.

connection

connection

In this screen, we have the options for creating different types of operations against the database:

connection

connection

Click on the next button:

connection

connection

Parameters Configurations:

connection

connection

Options for Filter parameters Configuration:

connection

connection

Here we need to add new External List, Click on the “External List”:

connection

connection

Select the Site here and click ok button:

connection

connection

Enter the list name here and click ok button:

connection

connection

After that, refresh the SharePoint site, we can see the external list here and click on the list:

list

list

Here we have the error message “Access denied by Business Connectivity.”

Solution for this Error

SharePoint central admin, click on the Manage service application:

serviceapplition

serviceapplition

Click on the Business Data Connectivity Service:

data connectivity

data connectivity

Set the permission for this list:

content-type

content-type

Click ok after setting the permissions:

permission

permission

After that, refresh the site and hope this will work… but again, it has a problem. The error message like Login failed for user “NT AUTHORITYANONYMOUS LOGON”.

Solution for this Error

We need to edit the connection properties, the Authentication mode selects the value ‘BDC Identity’.

edit connection properties

edit connection properties

Then follow the below mentioned steps.

Open PowerShell and type the following lines:

$bdc = Get-SPServiceApplication | 

where {$_ -match “Business Data Connectivity Service”}

$bdc.RevertToSelfAllowed = $true

$bdc.Update();

Now it’s working fine.

newitem

newitem

And there is a chance for one more error like:

Database Connector has throttled the response.

The response from database contains more than ‘2000’ rows. 

The maximum number of rows that can be read through Database Connector is ‘2000’. 

The limit can be changed via the ‘Set-SPBusinessDataCatalogThrottleConfig’ cmdlet 

It’s because it depends on the number of recodes that exist in the table.

Solution for this Error

Follow the below steps:

Open PowerShell and type the following lines and execute:

$bcs = Get-SPServiceApplicationProxy | where{$_.GetType().FullName 

-eq (‘Microsoft.SharePoint.BusinessData.SharedService.’ + ‘BdcServiceApplicationProxy’)}

$BCSThrottle = Get-SPBusinessDataCatalogThrottleConfig -Scope database 

-ThrottleType items -ServiceApplicationProxy $bcs

Set-SPBusinessDataCatalogThrottleConfig -Identity $BCSThrottle -Maximum 1000000 -Default 20000

Now it will work fine.

Advertisements

Leave a Reply

Please log in using one of these methods to post your comment:

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