如何清除 SharePoint 使用日志和/或 Web 分析日志 [英] How to clear the SharePoint Usage Logs and/or Web Analytics Logs

查看:24
本文介绍了如何清除 SharePoint 使用日志和/或 Web 分析日志的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何清除 SharePoint 使用日志和/或 Web 分析日志?我已尝试删除 {SharePoint Hive}\Logs 中的 *.usage 文件,并删除 Usage Service 应用程序和 Web Analytics Service 应用程序?

How do I clear the SharePoint Usage Logs and/or Web Analytics Logs? I've tried deleting the *.usage files found in {SharePoint Hive}\Logs, and deleting the Usage Service Application as well as the Web Analytics Service Application?

我之所以如此,是因为我有一个确定访问量最大的网站的 Web 部件.在我的代码中,我使用

The reason why I as is because I have a web part that determines the most visited sites. In my code I use the

SPWeb.GetUsageData(SPUsageReportType.url, SPUsagePeriodType.lastMonth)

方法,它总是返回相同的数据.我想重置它返回的值.

method, and it always returns the same data. I would like to reset the values it returns.

推荐答案

您是否尝试查看使用情况数据库?使用可能由该数据库支持.

Have you tried looking at the usage database? Usage might be backed by that database.

您还可以限制特定使用项的保留时间范围:Set-SPUsageDefinition -Identity"Page Requests" -DaysRetained 3 或查看此博客文章:如何减小日志数据库的大小或如何从日志数据库中清除旧数据.

You can also limit the retention timeframe for specific usage items: Set-SPUsageDefinition -Identity"Page Requests" -DaysRetained 3 or see this blog post: How to reduce the size of logging database OR How to purge the old data from Logging Database.

此处显示了仅使用中央管理员清除日志的另一种方法:如何删除 Sharepoint 上的使用日志.Sahhil Malik 展示了更多刷新日志的方法:SharePoint 2010 - 驱动器用完了可用空间.

Another way of clearing the logs is shown here using only central admin: How to Delete Usage Logs on Sharepoint. Sahhil Malik shows yet more ways to refresh the logs: SharePoint 2010 - Drives are running out of free space.

这篇关于如何清除 SharePoint 使用日志和/或 Web 分析日志的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆