How To

Tutorials and detailed steps on how to achieve some goal


SharePoint column limit and Row-wrapping in SQL

Written by // Rogério Cruzeiro Categories // How To, Brain Dump

"SharePoint Server 2010 data is stored in SQL Server tables. To allow for the maximum number of possible columns in a SharePoint list, SharePoint Server will create several rows in the database when data will not fit on a single row. This is called row wrapping.

Each time that a row is wrapped in SQL Server, an additional query load is put on the server when that item is queried because a SQL join must be included in the query. To prevent too much load, by default a maximum of six SQL Server rows are allowed for a SharePoint item. This limit leads to a particular limitation on the number of columns of each type that can be included in a SharePoint list. The following table describes the limits for each column type.

The row wrapping parameter can be increased beyond six, but this may result in too much load on the server. Performance testing is recommended before exceeding this limit..."


$web = http://webapplication
$webapp = Get-spwebapplication $web
$webapp.MaxListItemRowStorage = 8 #the default value is 6


Manage SharePoint 2010 list throttling individually

Written by // Rogério Cruzeiro Categories // How To, Brain Dump

Enable Throttling via Powershell

Throttling can be enabled and disabled on a list-by-list basis to overcome some temporary threshold issues.

Check if throttling is currently enabled:

$web = Get-SPWeb http://URL_OF_YOUR_SITE
$list = $web.Lists["NAME_OF_YOUR_LIST"]


This will return true or false according to the Throttling settings. If it returns True, the the List has been throttled (has more items than the List View Throttle limit).  If it returns false, it has either less than the List View Throttle limit or throttling has been disabled via the EnableThrottling property.

To enable throttling on a list, simply run the following 

$web = Get-SPWeb http://URL_OF_YOUR_SITE 
$list = $web.Lists["NAME_OF_YOUR_LIST"]
$list.EnableThrottling = $true

Enable all sites in this installation to use the following set of features

Written by // Rogério Cruzeiro Categories // How To

Control this small disaster

So you checked the box and clicked OK? Great so now you have the Content Organizer Feature and the correspondent Drop Off Library enabled on every single site of every site collection of every Web Application in that farm. If this is your goal, great! If not keep reading to find out how to contain this small disaster whithout the need of going to every site and do things manually.

Actually Chris Kent wrote a briliant blog post exactly on how to solve this mess, check it out and good luck.

Thank you Chris.


Clear and rebuild the SharePoint 2010 Configuration Cache

Written by // Rogério Cruzeiro Categories // How To

Microsoft SharePoint Foundation Usage Data Import Job Fail

Possible solution for Usage Data Import Job Fail and Execute Method SPUsageImportJobDefinition Fail errors:

Every 15 minutes this warning appears on the event viewer:

"The Usage Data Import timer job failed. You can rerun this job using the Timer Job Status page in the SharePoint Central Administration site."


 Followed by the error:

"An update conflict has occurred, and you must re-try this action. The object SPUsageServiceInstance was updated by DOMAIN\farmaccount, in the OWSTIMER process, on machine SHAREPOINTSERVERNAME.  View the tracing log for more information about the conflict."


Possible resolution

Clear SharePoint CONFIGURATION cache. (not output cache, configuration cache). 

  1. Stop the Windows SharePoint Services Timer service
  2. Navigate to the cache folder
    • In Windows Server 2008, the configuration cache is in the following location: %SystemDrive%:\ProgramData\Microsoft\SharePoint\Config\GUID
    • In Windows Server 2003, the configuration cache is in the following location: %SystemDrive%:\Documents and Settings\All Users\Application Data\Microsoft\SharePoint\Config\GUID
  3. Locate the folder that has the file "Cache.ini" in it
  4. Back up the Cache.ini file. DO NOT DELETE THIS FILE
  5. Delete all the XML configuration files in the GUID folder.
    • Make sure that you do not delete the GUID folder and the Cache.ini file that is located in the GUID folder.
  6. Edit the Cache.ini file and replace all content with "1" (without quotes).
  7. Start the Windows SharePoint Services Timer service
  8. Make sure the the xml files are re-created in after you start the service
  9. Wait untill all files are re-created and the value in the Cache.ini file matches the one on the backup file and repeate the procedure on every SharePoint servers in the farm.

How to configure vs remote debugging for SharePoint 2010

Written by // Rogério Cruzeiro Categories // How To

  1. First download the x64 bits version of the Microsoft Visual Studio 2010 Remote Debugger from Microsoft website

  2. Install it on the server and run it as Administrator

  3. Make sure the WSP package / DLL in the GAC is up to date

  4. Copy the .pdb file from your build directory to the GAC folder
    Tip #1: use command line copy command
    Tip #2: map the windows assembly folder to a network drive to easily explore the inner folders

  5. Make sure you have and account with the same name in both machines

  6. Back to Visual Studio paste the server name in the qualifier text box (something like DOMAIN\username@SERVERNAME), hit Enter and the process list should popup from the server

  7. Attach to the appropriate IIS process (w3wp.exe) or SharePoint Timer Job process (OWSTIMER.EXE) 

  8. Wait while symbol are loading and after that you should able to debug the solution and hit breaking points.

Find closed web parts using SharePoint UI

Written by // Rogério Cruzeiro Categories // How To, Brain Dump

Web Part Maintenance Mode

How to find closed Web Parts?
Open the Web Part page in Web Part Maintenance Mode.

Append ?contents=1 at the end in address bar