Wednesday, January 11, 2012

SharePoint 2010 limit exceeded in BCS

Connector has throttled the response. The response from database contains more than '2000rows. The maximum number of rows that can be read through Database Connector is '2000Connector has throttled the response. The response from database contains more than '2000rows. The maximum number of rows that can be read through Database Connector is '2000

Check limit

$bcs = Get-SPService
PS C:\Users\administrator> $bcs = Get-SPServiceApplicationProxy | where{$_.G
etType().FullName -eq (`Microsoft.SharePoint.BusinessData.SharedService.' + `BdcServiceApplicationProxy')}
PS C:\Users\administrator>
PS C:\Users\administrator> $BCSThrottle = Get-SPBusinessDataCatalogThrottleConfig -Scope database -ThrottleType items -ServiceApplicationProxy $bcs
PS C:\Users\administrator>  $BCSThrottle

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

Set Limit to 50000

PS C:\Users\administrator>  Set-SPBusinessDataCatalogThrottleConfig -Identit
y $BCSThrottle -Maximum 1000000 -Default 50000
PS C:\Users\administrator>  $BCSThrottle = Get-SPBusinessDataCatalogThrottle
Config -Scope database -ThrottleType items -ServiceApplicationProxy $bcs
PS C:\Users\administrator>
PS C:\Users\administrator>  $BCSThrottle

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

Tuesday, January 10, 2012

Restore Lost User when restoring from full DB backup in SQL Server 2008

MS SQL Server 2008 R2

To fix user login from the restored full db run the query below

EXEC sp_change_users_login 'Auto_Fix','user1',NULL,'mypassword'