About Me

Having 12 years experience in Microsoft technologies.Since more than 7 years working in SharePoint technologies. Expert in providing consultation for SharePoint projects. Hands on with development and administration.

Wednesday, 11 December 2013

SharePoint 2010: BCS External List Throttling

Sometime it may happen that your external list worked well on development server but when you deploy it to production server, Surprisingly it do not work.

Most common cause is that BCS has throttled an external system call for taking too long, or trying to transfer too much data. If you have logging turned on for Business Connectivity Services in Central Administration -> Monitoring -> Diagnostic Logging you will see errors similar to this in your Sharepoint Logs:
Error while executing web part: Microsoft.BusinessData.Runtime.ExceededLimitException: 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′.
Defaul throttling is set to 2000 rows. By default this feature is enabled in SharePoint 2010 to deny access of Service attacks that could adversely affect SharePoint or external system health by performing huge transactions. But the better part is that you can change the limit or disable them as per your business needs. Remember that this is a farm level setting.

You can change these throttle limits using the following powershell script:
$bdcProxy = Get-SPServiceApplicationProxy | where {$_.GetType().FullName -eq ('Microsoft.SharePoint.BusinessData.SharedService.' + 'BdcServiceApplicationProxy')}
To view a rule, run the following command:
$dbRule = Get-SPBusinessDataCatalogThrottleConfig -Scope Database -ThrottleType Items -ServiceApplicationProxy $bdcProxy
Use $dbRule to view throttling rules. This handle will maintain only the fetched copy. If you do anything to change a throttling rule, you should re-fetch it from BCS using the above script to be sure that you have the latest copy.

To view the $dbRule by itself just type $dbrule, you’ll see something like this:
Scope: Database

ThrottleType: Items 

Enforced: True 

Default : 2000 

Max: 1000000
You can change it using a command like any of these examples:
Set-SPBusinessDataCatalogThrottleConfig -Identity $dbRule -Maximum 1000000 -Default 3000

#Default and Maximum must be provided together. This increases the limit for external lists to 3000.

#This disables a throttling rule. 

Set-SPBusinessDataCatalogThrottleConfig -Identity $dbRule -Enforced:$false



#This enables a throttling rule. 

Set-SPBusinessDataCatalogThrottleConfig -Identity $dbRule -Enforced:$true

Now if you type $dbRule, you won’t see the changes reflected. You should re-fetch the rule using Get-SPBusinessDataCatalogThrottleConfig and try again to view $dbrule but it may take a few minutes for them to be reflected in external lists and other runtime scenarios.

1 comment:

  1. Information was good, I like your post.
    Looking forward for more on this topic.
    SharePoint 2013 Development Training Online

    ReplyDelete