SharePoint 2016 On premises Workflow History Clean Up

%3CLINGO-SUB%20id%3D%22lingo-sub-1180311%22%20slang%3D%22en-US%22%3ESharePoint%202016%20On%20premises%20Workflow%20History%20Clean%20Up%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1180311%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20All%3A%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3EI%20have%20workflow%20history%20for%20sharepoint%20list%20which%20has%20almost%20%3CFONT%20color%3D%22%23FF0000%22%3Emore%20than%20100%20millions%20of%20items(around%26nbsp%3B32GB%20for%20workflow%20history)%3C%2FFONT%3E%20This%20WF%20history%20list%20makes%20problem%20when%20I%20tried%20to%20connect%20SPD%20to%20clear%20this%20list.%26nbsp%3B%20%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3E(Just%20FYI-%20I%20checked%26nbsp%3B%20timer%20job%20named%20%E2%80%9CWorkflow%20auto%20cleanup%E2%80%9D%20for%20web%20application%2C%26nbsp%3B%20is%20working%20fine.%20but%20still%20in%20sharepoint%20w%3CFONT%20face%3D%22arial%2Chelvetica%2Csans-serif%22%20color%3D%22%23000000%22%3Eorkflow%20history%20list%20has%20almost%2030GB%2C%20which%20is%20100's%20of%20million%20records.%3C%2FFONT%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CFONT%20color%3D%22%23000000%22%3E%3CFONT%20face%3D%22arial%2C%20helvetica%2C%20sans-serif%22%3EI%20am%20trying%20to%20delete%20list%20items%26nbsp%3B%20using%20%3C%2FFONT%3Epower%20shell%3CFONT%20face%3D%22arial%2C%20helvetica%2C%20sans-serif%22%3E%26nbsp%3Bscript%20but%20it%20will%20takes%20almost%203-4%20months%20of%20time.%26nbsp%3B%3C%2FFONT%3E%3C%2FFONT%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3EIs%20there%20any%20other%20solution%26nbsp%3Bthat%20I%20can%20clear%20workflow%20history%20quickly%3F%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3EThanks%20in%20Advance!!%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1180311%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3E2013%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EAdmin%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EPowerShell%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ESharePoint%20Online%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ESharePoint%20Server%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1180344%22%20slang%3D%22en-US%22%3ERe%3A%20SharePoint%202016%20On%20premises%20Workflow%20History%20Clean%20Up%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1180344%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F67498%22%20target%3D%22_blank%22%3E%40Sravani%20Muttineni%3C%2FA%3E%26nbsp%3BIn%20my%20experience%20(SP2013%20though)%2C%20I%20never%20bothered%20trying%20to%20clean%20it%20up.%20For%20large%20active%20lists%20I'd%20go%20into%20SPD%20every%20year%20and%20change%20the%20workflow%20to%20'New%20History%20List'%20and%20republish.%20That%20will%20give%20you%20a%20new%20empty%20list.%20If%20I%20didn't%20need%20the%20old%20information%2C%20then%20I'd%20delete%20the%20old%20list.%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1180494%22%20slang%3D%22en-US%22%3ERe%3A%20SharePoint%202016%20On%20premises%20Workflow%20History%20Clean%20Up%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1180494%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F189854%22%20target%3D%22_blank%22%3E%40Robin%20Nilsson%3C%2FA%3E%26nbsp%3BI%20had%20a%20plan%20to%20delete%20that%20list%20but%20I%20couldn't%20delete%20that%20list%20too%2C%20tried%20in%20SPD.%20So%20I%20create%20new%20history%20list%20and%20republished%20already.%20I%20have%20to%20clear%20this%20workflow%20history%20because%20it%20is%20occupying%20lot%20of%20space%20in%20DB%2Cespecially%20for%20all%20users%20data%2C%20all%20docs%20%2C%20Docs%20Stream%20and%26nbsp%3B%20storage%20metric%20tables.%20Our%20Content%20DB%20size%20is%20now%26nbsp%3B%20891195.38%20MB.%26nbsp%3B%3C%2FP%3E%3CP%3EThat's%20way%20I%20am%20looking%20any%20other%20solution%20to%20clear%20WF%20history%20list.%20Thanks!%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
Occasional Contributor

Hi All: 

 

I have workflow history for sharepoint list which has almost more than 100 millions of items(around 32GB for workflow history) This WF history list makes problem when I tried to connect SPD to clear this list. 

 

(Just FYI- I checked  timer job named “Workflow auto cleanup” for web application,  is working fine. but still in sharepoint workflow history list has almost 30GB, which is 100's of million records.

 

I am trying to delete list items  using power shell script but it will takes almost 3-4 months of time. 

 

Is there any other solution that I can clear workflow history quickly? 

 

Thanks in Advance!! 

 

2 Replies
Highlighted

@Sravani Muttineni In my experience (SP2013 though), I never bothered trying to clean it up. For large active lists I'd go into SPD every year and change the workflow to 'New History List' and republish. That will give you a new empty list. If I didn't need the old information, then I'd delete the old list. 

Highlighted

@Robin Nilsson I had a plan to delete that list but I couldn't delete that list too, tried in SPD. So I create new history list and republished already. I have to clear this workflow history because it is occupying lot of space in DB,especially for all users data, all docs , Docs Stream and  storage metric tables. Our Content DB size is now  891195.38 MB. 

That's way I am looking any other solution to clear WF history list. Thanks!