Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

The Auditdata table in my sharepoint site is becoming huge (over 70 Gb and 200 Million records) running the Trimauditlog command (http://technet.microsoft.com/en-us/library/cc706879.aspx) times out as it is very slow.

Can i simply truncate that table? or there are side effects to doing that (other than losing audit data)

share|improve this question

2 Answers 2

(You didn't specify if you'd tried this approach already) Why not trim the table in smaller chunks up to your target date using the '-date' parameter instead of all at once?

share|improve this answer

You should break up your stsadm commands in batch.

Query your databases and get a start date. Then use excel to create the stsadm commands day by day and put them in a text file. Sample:

time /T
date /T
echo %date% %time% >> output.txt
stsadm -o trimauditlog -date 20070729 -databasename WSS_Content >> output.txt

time /T
date /T
echo %date% %time% >> output.txt
stsadm -o trimauditlog -date 20070730 -databasename WSS_Content >> output.txt

run them using the task scheduler. One note. I noticed it ran a lot faster after we disabled all audits setup in the site collections for the content db. Might be my imagination but it seemed to help.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.