Skip to main content
6-Contributor
Aug 15, 2025 10:08 AM UTC
Question

How to delete all the WTPARTs

Hello,
Is there a way to use SQL queries to delete all the WTPARTs and clean up all the related links tables?
Some articles state that this is possible through purge and link removal, but can this be done through the DB?

6 replies

18-Opal
Aug 17, 2025 11:36 AM UTC

Full WTPart deletion from Windchill is doable for sure but I would do this in Java rather than SQL script.

I have a Java tool that companies have requested I write for them to do similar cleanups.

 

Translate
dossPLM6-ContributorAuthor
6-Contributor
Aug 18, 2025 8:19 AM UTC

I know this can be achieved through Java coding using APIs. However, with a proper setup and DB knowledge, this could be executed quickly through the DB scripts.

Translate
avillanueva
23-Emerald II
Aug 18, 2025 12:23 PM UTC

Is time a crticial requirement means is this part of some planned event or downtime? Or are you looking to remove and move on?  There are so many places where Parts can be referenced in related tables. Either Java or SQL would need to account for them all and there is a risk it misses some. Curious as to why you are looking to delete all.

I've done the manual approach. Its difficult since you get blocked if a Part is called out by another Part. I eventually was able to clear out thousands of records but it was very repetative and tedious. However, it was safe. Using supported UI methods, integrity was maintained. 

Translate