Sharepoint学习笔记---SPList--External List因BCS的Throttling limit 节流限制导致的错误
在通过BCS创建了一个External List并连接到Northwind数据库的Orderdetails表时,显示出错误信息:
"Unable to display this Web Part. To troubleshoot the problem, open this Web page in a Microsoft SharePoint Foundation-compatible HTML editor such as Microsoft SharePoint Designer. If the problem persists, contact your Web server administrator."
如图:
这是因为我们导入的数据表的数据行超出了BCS的默认节流限制值(默认是2000),所以就会看到上面的错误信息。
解决方法也很简单,就是修改这个默认的节流限制值, 此处,我们把它增大到40000。
Start -> All Programs -> Microsoft SharePoint 2010 Products -> SharePoint 2010 Management Shell
(Set-SPBusinessDataCatalogThrottleConfig)
(Get-SPBusinessDataCatalogThrottleConfig)
PS ZL:\> $proxy=Get-SPServiceApplicationProxy | where {$_ -match "Business data Connectivity Service"}
PS ZL:\> Get-SPBusinessDataCatalogThrottleConfig -Scope database -ThrottleType items -ServiceApplicationProxy $proxy
PS ZL:\> $defaultThrottleConfig = Get-SPBusinessDataCatalogThrottleConfig -Scope database -throttleType items -ServiceApplicationProxy $proxy
PS ZL:\> $defaultThrottleConfig
PS ZL:\> Set-SPBusinessDataCatalogThrottleConfig -Default 40000 -Identity $defaultThrottleConfig -Maximum 1000000
PS ZL:\> $customThrottleConfig = Get-SPBusinessDataCatalogThrottleConfig -Scope database -ThrottleType items -ServiceApplicationProxy $proxy
PS ZL:\> $customThrottleConfig
PS ZL:\> Get-SPBusinessDataCatalogThrottleConfig -Scope database -ThrottleType items -ServiceApplicationProxy $proxy
PS ZL:\> $defaultThrottleConfig = Get-SPBusinessDataCatalogThrottleConfig -Scope database -throttleType items -ServiceApplicationProxy $proxy
PS ZL:\> $defaultThrottleConfig
PS ZL:\> Set-SPBusinessDataCatalogThrottleConfig -Default 40000 -Identity $defaultThrottleConfig -Maximum 1000000
PS ZL:\> $customThrottleConfig = Get-SPBusinessDataCatalogThrottleConfig -Scope database -ThrottleType items -ServiceApplicationProxy $proxy
PS ZL:\> $customThrottleConfig
如图:
然后再回到Sharepoint网站,可以看到数据已能正常显示: