We have had several tips this week regarding managing storage on CRM online, and I wanted to finish the week with one more way that the storage gremlins can creep up on you: Audit partitions.
I recently was reviewing one of my environment’s audit logs, and I found one of these things was not like the other.
Due to some unfortunate circumstances, the most recent audit partition is 164 GB (that’s right, with a G).
What you need to know about audit partitions:
- You can delete them, starting with the oldest one.
- You cannot delete the current audit partition until the end date. They happen quarterly, so the end of the current partition is 3/31.
- You can delete them via the SDK, but it has the same limitations as number 2.
So what this means is that if you have a very large audit partition and it is using all of your available storage, there is no supported way for you to shrink it or delete it. You have to wait until the end of the period, then you can delete it.
For on premises users, you can go the unsupported route and delete audit records via T-SQL. If you use CRM Online, open a ticket with Microsoft support or add additional storage should this happen to you.
How can we delete audit records via T-SQL?What would be the query as audit table other dependencies as well?
The answer to the question where are they stored differs depending on if you are using sql enterprise or standard. Since it is unsupported, I am not going to post step by step instructions, but this post should help you find them and figure out how to delete from audit base. There should be no real dependencies on these records. http://blogs.msdn.com/b/thecrmguys/archive/2011/09/07/what-s-behind-auditing-in-crm-2011.aspx
[…] http://crmtipoftheday.com/2015/03/20/auditingsize/ […]
thanks for the post, i have a question… in my instance of CRM I just can see the size of the log in number of rows instead of mb, how can i change or switch this to get a view like yours? Thanks in advance
That was explained in the link below. If you have the standard edition you will see rows and enterprise KB.
They removed the column for the size, now I have to create a support ticket to get info on that. Irritating.