This week is not what i had in mind. Why?
Monday morning when I arrived at the customer there was big panic a site was not doing the things it was expected to.
It was a critical site and sales would be down. After some investigation I found out that the WorkFlow History list had about
2.4 million items and growing hmm strange it does not work anymore…. The guy who originally build it was not aware of the Workflow history List.
So let this be a wise lesson Your Workflow History List will grow and no it will not truncate automatic if you do not have a policy set up.
You don’t want your documents to be deleted after a time passed by default
Ok so now to the solution I made a windows app which deleted batches of 2000 as 2000 is gives the best performance you can not delete millions of items by hand…
After doing this it had to be restarted by hand so not optimal but the beginning was made. The It Pro told me wow we need a tool like that.
Then I called my manager at the customer he told fine we will go on on Thursday since the SharePoint Connections was coming up.
So Tuesday I went to the SharePoint Connections in The Hague. But right after Steve Fox gave his Keynote my client called me.
You really have to come we have to need a fully auto tool since nobody can do anything anymore….
The list was 2.5 million now. And It affected the whole sitecollection!!!!
This was the moment I thought I make a console app. And I did.
But be aware that the states of your workflow are kept in The Workflow History.
This means if you delete the list or empty the whole list your workflows will not have a state anymore and need to be restarted by hand.
So in my tool I have parameters You give Url listname items to delete and as optional a date field.
The date field is looking at the last modified and selects all records prior to the date.
If you do not enter a date it will delete all items.
The itemstodelete is build in so you can run the tool and let it delete like 500.000 items in batches.
You can find the tool here http://spemptylargelist.codeplex.com/
Please do download it and start to us it.
By the way it does not empty your recycle bin you have to do that by hand.
Or add it in code.
0.000000
0.000000
Like this:
Be the first to like this post.