Saturday, August 28, 2010

Increasing SharePoint 2010 List Maximum

I have been developing on SharePoint since 2001 and it is beginning to amaze me that "mystery errors" remain. Ok, so recently I was setting up a SharePoint 2010 custom list pulling data from Bugtracker using the data connector. When I opened the page, I got the "unable to ... blah, blah" - mystery error. Anyway, I searched in Google, Bing, Yahoo...and nothing. Then after digging around in Google Groups, I found an interesting lead.

"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. "

Buried in the log
C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\LOGS

The maximum number of rows that can be read through Database Connector is '2000'. The limit can be changed via the 'Set-SPBusinessDataCatalogThrottleConfig' cmdlet.

Below is the script I needed to run in Powershell to increase the maximum limit. This allowed my 2500 bugs list from Bugtracker to be displayed. When the CEO is happy, I'm happy. Happy Coding.

$proxy = Get-SPServiceApplicationProxy where {$ -match “Business Data Connectivity Service”}
Get-SPBusinessDataCatalogThrottleConfig –Scope database –ThrottleType items –ServiceApplicationProxy $proxy

$defaultThrottleConfig = Get-SPBusinessDataCatalogThrottleConfig –Scope database –ThrottleType items –ServiceApplicationProxy $proxy

Set-SPBusinessDataCatalogThrottleConfig –Default 10000 –Identity $defaultThrottleConfig –Maximum 20000
$customThrottleConfig = Get-SPBusinessDataCatalogThrottleConfig –Scope database –ThrottleType items –ServiceApplicationProxy $proxy

No comments:

Post a Comment