Dear All if you are facing and issue for out of memory in sharepoint because of wss_logging database
here is a script
Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue
Set-SPUsageDefinition -Identity "Sandboxed Requests" -DaysRetained 3
Set-SPUsageDefinition -Identity "Content Import Usage" -DaysRetained 3
Set-SPUsageDefinition -Identity "Workflow" -DaysRetained 3
Set-SPUsageDefinition -Identity "Clickthrough Usage" -DaysRetained 3
Set-SPUsageDefinition -Identity "Content Export Usage" -DaysRetained 3
Set-SPUsageDefinition -Identity "Page Requests" -DaysRetained 3
Set-SPUsageDefinition -Identity "Feature Use" -DaysRetained 3
Set-SPUsageDefinition -Identity "Search Query Usage" -DaysRetained 3
Set-SPUsageDefinition -Identity "Site Inventory Usage" -DaysRetained 3
Set-SPUsageDefinition -Identity "Sandboxed Requests Monitored Data" -DaysRetained 3
Set-SPUsageDefinition -Identity "Timer Jobs" -DaysRetained 3
Set-SPUsageDefinition -Identity "Rating Usage" -DaysRetained 3
Second step
Get-SPUsageDefinition | ForEach-Object {Set-SPUsageDefinition -Identity $_.name -DaysRetained 1}
Third step
Once that's finished, a plain Get-SPUsageDefinition command should confirm that everything's been set back to 1 day.
Forth Step
Then go to sql server right click on the wss_logging database and shirnk
That's it
Forth Step
Then go to sql server right click on the wss_logging database and shirnk
That's it
Comments
Post a Comment