I want to reduce the size of the file from this db WSS_UsageApplication in my sql server/sharepoint farm. How to reduce the this huge file size.
WSS logging database grows quickly, it cause space issue as you are seeing. you have to tweak some setting to reduce the size.
- By default System retains 14 days of usage data. You can check the
current settings by running the following command:
- If you check the database from SQL server, you will notice that RequestUsage table is taking most of the space.
- So now you have option to Set the retention period from 14 days to less (maybe 10 or 7 days, spending upon the space these things is consuming.) You can use the Set-SPUsageDefinition to restrict it.
- Once you do it, you have to manually run the two timer jobs ‘Microsoft SharePoint Foundation Usage Data Import’ and ‘Microsoft SharePoint Foundation Usage Data Processing’.
Read this blog for more information. https://blogs.msdn.microsoft.com/manhar/2012/04/17/how-to-reduce-the-size-of-logging-database-or-how-to-purge-the-old-data-from-logging-database/