Deprecated: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /www/collab365_296/public/wp-includes/functions.php on line 7025

Deprecated: str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /www/collab365_296/public/wp-includes/functions.php on line 2162

Deprecated: Hook imagify_allow_picture_tags_for_webp is deprecated since version 2.2! Use imagify_allow_picture_tags_for_nextgen instead. in /www/collab365_296/public/wp-includes/functions.php on line 5758
How to clean-up a very large MSSCrawlURLLog with Powershell - Collab365
Deprecated: strstr(): Passing null to parameter #1 ($haystack) of type string is deprecated in /www/collab365_296/public/wp-includes/functions.php on line 1145

Deprecated: stripos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /www/collab365_296/public/wp-includes/functions.php on line 1152

Deprecated: stripos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /www/collab365_296/public/wp-includes/functions.php on line 1155

Deprecated: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /www/collab365_296/public/wp-includes/functions.php on line 1162

Deprecated: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /www/collab365_296/public/wp-includes/functions.php on line 1165

Deprecated: strstr(): Passing null to parameter #1 ($haystack) of type string is deprecated in /www/collab365_296/public/wp-includes/functions.php on line 1145

Deprecated: stripos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /www/collab365_296/public/wp-includes/functions.php on line 1152

Deprecated: stripos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /www/collab365_296/public/wp-includes/functions.php on line 1155

Deprecated: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /www/collab365_296/public/wp-includes/functions.php on line 1162

Deprecated: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /www/collab365_296/public/wp-includes/functions.php on line 1165

Warning: Undefined array key "url" in /www/collab365_296/public/wp-content/plugins/thrive-visual-editor/thrive-dashboard/inc/smart-site/classes/class-tvd-smart-shortcodes.php on line 85

2013-10-09

Problem

Very large SharePoint WSS_Search database

TroubleShooting

I started drilling down into the tables and found the MSSCrawlURLLog was over 79GB.!

The Crawl Log Cleanup for Search Application job runs daily and removes anything older than 90 days by default.  This was not happening correctly. So I tried changing the clean up job to delete logs that were older than 30 days. See Powershell scripts below.

Run the following to get a list of the search service application Ids.

Get-SPServiceApplication | Where {$_.TypeName -eq "Search Service Application"}

2. Run the following command to get the Search Service Application Object. Replace the Id with the Id of your search application that was output in the previous PowerShell command.

$searchApp = Get-SPServiceApplication | Where {$_.Id -eq "<your content service application id>"}

3. Set CrawlLogCleanUpIntervalInDays to 30

$searchApp.CrawlLogCleanUpIntervalInDays = 30 $searchApp.Update()

This had little to no effect.  The next step was to try an complete index reset and run a full crawl.  Again this had no effect.

I decided that this info was NOT needed – it’s just logs and that a purge would be my best bet. After all I wantded that 80GB back Plus I was having to back that DB up every night.

$ssa = Get-SPEnterpriseSearchServiceApplication "Enterprise Search Service"  $logViewer = New-Object Microsoft.Office.Server.Search.Administration.Logviewer $ssa  $logViewer.PurgeCrawlLog()
(Visited 361 times, 1 visits today)

About the author 

Adam Larkin

Summit Bundle

Get 200+ hours of Microsoft 365 Training for 27$!

Master Office 365, Power Platform & SharePoint & Teams With 200+ Hours Of Training Videos and 108 Ebooks in the Collab365 Academy. This offer is insane and is only available for a limited period.