BCS Webpart Error… Oh no, that trottling thing again!

By calejo on April 26th, 2012

So you been working aroung BCS, and tried every step on tutorials (good ones, like these)… but in the end, data is not presented to you and you receive error on the items display.

Ok, you have to increase your throttle maximum… how? Here it is:

$bdcProxy = Get-SPServiceApplicationProxy | where{$_.GetType().FullName -eq(‘Microsoft.SharePoint.BusinessData.SharedService.’ + ‘BdcServiceApplicationProxy’)}

Once you have a handle on the proxy, you can start working with the throttling rules. BCS throttle management works on a change-and-refresh strategy. If you do anything to change a throttling rule, you should re-fetch it from BCS to be sure that you have the latest copy. To view a rule, run a command like this one:

$dbRule = Get-SPBusinessDataCatalogThrottleConfig -Scope Database-ThrottleType Items -ServiceApplicationProxy $bdcProxy

Type $dbRule by itself, you’ll see something like this:

Scope: Database
ThrottleType: Items
Enforced: True
Default : 2000
Max: 1000000

Scope and ThrottleType describe the rule you’re working with. Enforced represents whether it’s turned on, and Default is the limit that is applied to external list. Custom web parts can override the Default limit and work on more data than external lists; they are instead limited by the Max limit.

Once you have a rule, you can change it using a command like any of these examples:

# This increases the limit for external lists to 3000.
Set-SPBusinessDataCatalogThrottleConfig -Identity $dbRule -Maximum 1000000 -Default 3000

#This disables a throttling rule. Notice the “:” instead of a space.
Set-SPBusinessDataCatalogThrottleConfig -Identity $dbRule -Enforced:$false

#This enables a throttling rule.
Set-SPBusinessDataCatalogThrottleConfig -Identity $dbRule -Enforced:$true

Your update is immediatly commited by Set-SPBusinessDataCatalogThrottleConfig, but it may take a while to appear on the external lists.

Be Sociable, Share!

Leave a reply