Thursday, August 20, 2015

SharePoint Foundation 2013 performance optimization

Here is the list of actions to perform to quickly improve the performance of your SharePoint Foundation 2013. Warning, these actions will sometimes have the effect of limiting the use of the logs and incidents.


1) Reduce WSS_Logging size by limiting the retention from 14 days to 1 day:

Paste the script below in the SharePoint Management Shell:

Set-SPUsageDefinition -Identity "Analytics Usage" -DaysRetained 1
Set-SPUsageDefinition -Identity "App Monitoring" -DaysRetained 1
Set-SPUsageDefinition -Identity "Bandwidth Monitoring" -DaysRetained 1
Set-SPUsageDefinition -Identity "Definition of usage fields for service calls" -DaysRetained 1
Set-SPUsageDefinition -Identity "File IO" -DaysRetained 1
Set-SPUsageDefinition -Identity "REST and Client API Action Usage" -DaysRetained 1
Set-SPUsageDefinition -Identity "REST and Client API Request Usage" -DaysRetained 1
Set-SPUsageDefinition -Identity "Sandbox Request Resource Measures" -DaysRetained 1
Set-SPUsageDefinition -Identity "Sandbox Requests" -DaysRetained 1
Set-SPUsageDefinition -Identity "Content Import Usage" -DaysRetained 1
Set-SPUsageDefinition -Identity "Content Export Usage" -DaysRetained 1
Set-SPUsageDefinition -Identity "Page Requests" -DaysRetained 1
Set-SPUsageDefinition -Identity "Feature Use" -DaysRetained 1
Set-SPUsageDefinition -Identity "Timer Jobs" -DaysRetained 1
Set-SPUsageDefinition -Identity "SQL Exceptions Usage" -DaysRetained 1
Set-SPUsageDefinition -Identity "SQL IO Usage" -DaysRetained 1
Set-SPUsageDefinition -Identity "SQL Latency Usage" -DaysRetained 1
Set-SPUsageDefinition -Identity "Task Use" -DaysRetained 1
Set-SPUsageDefinition -Identity "Tenant Logging" -DaysRetained 1
Set-SPUsageDefinition -Identity "App Statistics." -DaysRetained 1
Set-SPUsageDefinition -Identity "User Profile ActiveDirectory Import Usage" -DaysRetained 1

2) Reduce the Search indexation priority (NodeRunner.exe)

Paste the script below in the SharePoint Management Shell:

Set-SPEnterpriseSearchService -PerformanceLevel Reduced


3) Search Service Application optimization in Central Admin

3.1 Deactivate Search alerts status
3.2 Deactivate Query logging
3.3 Do not use Continious crawling with your Content Sources
3.4 Full Crawl during week-end
3.5 Incremental crawl at night


4) Stop IIS logging

Deactivate IIS logging for your SharePoint site


5) Deactivate all unnecessary SharePoint features

5.1 Site collection features
5.2 Site features


6) Install SP1


7) Install Cumulative updates


Tuesday, October 16, 2012

Delete library and documents directly via SQL in SharePoint 2010

This is not a good idea, but sometimes you have no choice and you must delete a SharePoint library and the documents directly via a MSSQL query.

I did not find any documentation about it, but after some research in the SharePoint SQL tables, I tried this:

DO NOT FORGET TO BACKUP YOUR SHAREPOINT BEFORE !


Declare @ListId as VarChar(200)
Set @ListId = 'MyListId'                   /*** you have to give the List Id ***/


/********* FILES STREAM DELETE *****************/ 
delete from AllDocStreams where Id in (Select Id from AllDocs where listId = @ListId and Leafname <> 'Form')


/********* FILES & LIST INFO DELETE  *****************/ 
delete FROM AllDocs where listId = @ListId


/********* LIST INFO DELETE (Number of files in the library and next available ID) *****************/
delete FROM AllListsAux where listId = @ListId


/********* LIST INFO DELETE (extra info) *****************/
delete FROM AllListsPlus where listId = @ListId




This script is definitely incomplete, so any help is welcome!

Tuesday, May 29, 2012

SharePoint 2010 Products Configuration Wizard Error

Got error message "The exclusive inplace upgrader timer job failed." when running SharePoint 2010 Products Configuration Wizard.

Solution:
  • Deactivate Use Access Control on all SharePoint server(s), then restart the server(s)
  • Give Windows Domain Adminitrator rights to the user used by the service SharePoint 2010 Timer (SPTimerV4)
  • Give maximum rights in SQL to this Windows user: user sould be db_owner of Sharepoint databases and should have all Server roles (maybe not perfect considering security but allows the Products Configuration Wizard to run properly)