Community Tip - Did you get an answer that solved your problem? Please mark it as an Accepted Solution so others with the same problem can find the answer easily. X
How to delete all the WTParts and BOMs? In our development machine we have loaded SAP parts without taking a backup. we would like to wipe out the data and load again for testing. SAP parts weere
How to clean up WTParts and BOMs in bulk
Solved! Go to Solution.
Can’t you just write a utility that finds all links you loaded and delete them and then find all WTPartMasters you loaded and delete them.
You can search the links and masters by the date created if you know when the loading occurred.
I had to do a mass delete once. I had three windchill shells running the code for 3 days straight. When done the DB had shrunk by 24 GB.
Hello @spitchan
it is interesting question.
I needed same thing in a past.
I found only one way to delete all WTParts that I moved them all to a folder and then I deleted that folder.
I had a trouble with an object counts so I needed to increase MethodServer memory to 10 GB because there where over 200k WTParts and links
Hope this could help to anyone who deals with the question.
PetrH
How many do you have? If its <50000, I can see you doing it manually, churn and burn. Good idea to centrally locate them but use the collector to your advantage. Grab 1000 to start in a collector and then include upstream links until no more are found (or where used). This should grab upper level assemblies that will stop you from deleting them cause you will have a trailing reference. You could also look at WTPartUsageLink table and see which parts have BOMs. Deleting those first will make the rest go quickly. Purging all iterations first will also help reduced references.
Hi @avillanueva
Doesn't matter how many there are.
Just move all WTParts to one folder and then just delete one folder.
I know the moving is annoying if you can display just 50k objects in a search results.
The delete operation took several hours to complete.
PetrH
Six of one, half a dozen of the other. Search and move operation will be the time consuming part and this way he does not have to worry about running out of memory. It would suck to find out that after several hours that it failed.
To your idea. I would create query report to search WTParts without "where used links" and then use this report in the advanced search.
It could help to search objects that are available to delete.
PetrH
Hi @Marco_Tosin
Exactly 😄
and additional help how to allow querybuilder reports in advanced search
PetrH
Can’t you just write a utility that finds all links you loaded and delete them and then find all WTPartMasters you loaded and delete them.
You can search the links and masters by the date created if you know when the loading occurred.
I had to do a mass delete once. I had three windchill shells running the code for 3 days straight. When done the DB had shrunk by 24 GB.
we deleted schema and refreshed from test and loaded the data again