码迷,mamicode.com
首页 > 数据库 > 详细

How to reduce the size of logging database OR How to purge the old data from Logging Database

时间:2014-06-20 22:04:05      阅读:333      评论:0      收藏:0      [点我收藏+]

标签:style   blog   http   color   com   get   

WSS logging database grows very fast and it cause the storage problem most of the time in sharepoint server 2010.

To reduce the size of the logging database or to purge the old data from the logging database we can these steps. 

To find the Logging Database Name go to following path:-

Login to Central Administration -> Monitoring -> Configure Usage and health data collection->

 bubuko.com,布布扣

 

The Logging database stores the following things:-

  • ULS Logs from 14 Hive\LOGS

  • Raw Resource Usage Data

 This data is used by Web Analytics in Sharepoint. Two timer jobs Microsoft SharePoint Foundation Usage Data Import and Microsoft SharePoint Foundation Usage Data Processing are used for importing and processing the raw data in the web analytics database.

By Default the system retains 14 days of Usage data in this database. By following PowerShell command we can check and change the value of retention days of this database. Get-spusagedefinition and Set-SPUsageDefinition  

Try  Get-SPUsageDefinition

bubuko.com,布布扣

 Now you need to find which table is taking most of the space inside the WSS logging Database. 

 

You Can check the same from the SQL Server

Login to Sharepoint Management Studio -> Select your logging Database (Right Click) -> Reports- > Standard Reports -> Disk Usage by Top Tables.

 bubuko.com,布布扣

 

 Say RequestUsage* is taking most of the space inside WSS Logging database so  you can bring down the retention period of  Page Request Event.

Or if you want you can bring down the retention period for all the Events for any number of days from 14 to 1. 

Use the following command to do so.

Set-SPUsageDefinition -Identity "Page Requests" -DaysRetained 3

Run the same Power Shell command again to cross check "Get-SPUsageDefinition" and check the Retention period is changed or not.

 bubuko.com,布布扣

After that we need to run the two timer jobs to clean the old data ‘Microsoft SharePoint Foundation Usage Data Import‘ and ‘Microsoft SharePoint Foundation Usage Data Processing‘.

Go to Sharepoint Central Administration -> Monitoring -> Configure Usage and health data collection-> Log Collection Schedule.

And it will take you to the timer jobs.

 bubuko.com,布布扣

 Now Click on both the Job Definitions one by one and hit ‘Run Now‘ to run the timer jobs

bubuko.com,布布扣

 

Once the timer jobs is run you can check and confirm database has released the space.

 

 

http://blogs.msdn.com/b/manhar/archive/2012/04/17/how-to-reduce-the-size-of-logging-database-or-how-to-purge-the-old-data-from-logging-database.aspx

 

How to reduce the size of logging database OR How to purge the old data from Logging Database,布布扣,bubuko.com

How to reduce the size of logging database OR How to purge the old data from Logging Database

标签:style   blog   http   color   com   get   

原文地址:http://www.cnblogs.com/vivianlou/p/3795992.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!