Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

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

(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

Your Answer

 
discard

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