Guest post from Trevor Eddolls, CEO iTech-Ed Ltd (www.itech-ed.com), specialists for IT consultancy, analysis, technical education and training, web design, writing, and editing solutions. Read more from Trevor on his mainframe blog and follow him on Twitter.
We start the year with another in our series of SharePoint hints and tips from our expert Darren Pritchard. This time he’s looking at how to sucessfully audit SharePoint site collections.
To enable/disable SharePoint auditing:
Figure 1: Configure Audit settings page
To trim audit files:
SET STSADM="c:\Program Files\Common Files\Microsoft
Shared\Web Server Extensions\12\bin\STSADM.EXE"
%stsadm% -o trimauditlog -date <YYYYMMDD> -databasename
<CONTENTDATABASE>
Pause
Figure 2: Purge Audit Logs.bat
I would suggest running this on a system without users because it may have an impact on performance.
If you have large amounts of audit log files, I would recommend running the trim command on a month’s worth of audit logs at a time. The SQL transaction log file will grow very large during the trim process.
Once you have trimmed the audit logs you will need to run a shrink database task within SQL to reclaim the space used during the trim process.
I'd like to thank Darren for his continuing contributions, and a happy New Year to everyone.