WSS_Logging database size

Adrian Porter 0 Reputation points
2023-12-23T05:57:45.6833333+00:00

We have a SharePoint 2016 environment. The WSS_Logging database has grown extensively and we wish to reduce size. When analysing the table usage report the clear culprit is a table called "dbo.MonitoredScopeDiagnosticsData_Partition". See screenshot below. The table in question has 42Gb just on its own.

User's image

We followed articles on how to tackle the WSS_Logging such as this one below but to no avail.

https://guidesharepoint.wordpress.com/2014/03/03/how-to-reduce-the-size-of-logging-database-and-how-to-purge-the-old-data-from-logging-database/

Our Questions

  1. Which SPUsageDefinition setting (if any) is controlling the retention of the table in question?
  2. Can contents of the MonitoredScopeDiagnosticsData_Partition table be safely truncated?

Thank you

AP81

Microsoft 365 and Office SharePoint For business Windows
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Emily Du-MSFT 51,836 Reputation points Microsoft External Staff
    2023-12-25T09:17:39.28+00:00

    1.This table stores diagnostics data. It can be configured by using Central Administration or PowerShell.

    (1)Central Administration -> Monitoring -> Configure diagnostic logging -> In the Number of days to store log files box, type the number of days (1-366) that you want logs to be kept. After this time, logs will automatically be deleted.

    (2)Use Set-SPDiagnosticConfig.

    2.Diagnostic logs contain important data. Therefore, back up the logs regularly to ensure that this data is preserved.

    References:

    https://learn.microsoft.com/en-us/sharepoint/administration/configure-diagnostic-logging

    https://learn.microsoft.com/en-us/powershell/module/sharepoint-server/Set-SPDiagnosticConfig?view=sharepoint-ps&preserve-view=true


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.