Sharepoint gathers usage and health data to database called WSS_Logging. By Default retention period is 14 days. If You want to make it lower, lets say 2 days use the below oneliner for it.
Get-SPUsageDefinition | Set-SPUsageDefinition -DaysRetained 2
And then just a quick hint for releasing space from Sharepoint WSS_Logging database. Use the query below to truncate db and free used space.
DECLARE @TableName AS VARCHAR(MAX) DECLARE table_cursor CURSOR FOR SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_TYPE = 'BASE TABLE' AND TABLE_NAME LIKE '%_Partition%' OPEN table_cursor FETCH NEXT FROM table_cursor INTO @TableName WHILE @@FETCH_STATUS = 0 BEGIN DECLARE @SQLText AS NVARCHAR(4000) SET @SQLText = 'TRUNCATE TABLE ' + @TableName EXEC sp_executeSQL @SQLText FETCH NEXT FROM table_cursor INTO @TableName END CLOSE table_cursor DEALLOCATE table_cursor

Archives