Skip to main content
6-Contributor
August 15, 2025
Question

How to delete all the WTPARTs

  • August 15, 2025
  • 1 reply
  • 547 views

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?

1 reply

18-Opal
August 17, 2025

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.

 

dossPLM6-ContributorAuthor
6-Contributor
August 18, 2025

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.

avillanueva
23-Emerald I
23-Emerald I
August 18, 2025

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.