cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - When posting, your subject should be specific and summarize your question. Here are some additional tips on asking a great question. X

Deleting old useless Representations after upgrade - food for thought

dgraham-4
1-Newbie

Deleting old useless Representations after upgrade - food for thought

Thought I'd pass this along if anyone is interested.

After upgrading from 8.0 to 10.1 all representation created in 8.0 are
useless due to new file format.

I dug into the dB and determined the linkage for the representation is:

DerivedImage plays A role in HolderToContent and ApplicationData plays B
role in the same HolderToContent.

I did a query to find all id numbers of DerivedImage table entries created
before our go live date.

I then wrote a class to find and delete these objects from the dB. In this
case deleting the DerivedImage object will cause the Holder and the
AppData to also be deleted.

The code works well and I will be able to delete 4.000,000 to 5,000,000
table entries (that can never be used again anyway) as well maybe 3 or 4
million unreferenced files from Vault folders.

There is a util, DEleteREpUtil, to do this but decompling it showed it
used the same API's to find and delete the DerivedImage as I did. It's
just not as flexible in how it operates.

David Graham
Windchill Administrator
Pro|ENGINEER Administrator
CAx Administrator


Emhart Glass Manufacturing Inc.
Emhart Glass Research Center
123 Great Pond Drive | Windsor, CT 06095 | USA
Telephone +1 (203) 376-3144 | Telefax +1 (860) 298 7397
Mobile +1 (203) 376-3144 |
2 REPLIES 2

David - What version of windchill are you running ? The DeleteRepUtil I'm running on 9.1 only allows deleting via list of OIDs, so we had to create some sql queries to firstfind the OIDs, then use the DeleteRepUtil.

Ed,


Once finshed reading the file the list object is passes to PersistenceHelper.manager.delete(list);


I did this


spool DerivedImage.txt create;


select ida2a2 from DerivedImage where CREATESTAMPA2<'14-JAN-2013';


spool off;


I then passed the output file to my tool which interestingly enough did exactly what the OOTB tool did except that my loop found the object and then imediately deleted it rather than add it to a list to be deleted as a bulk delete later on.


David



In Reply to Ed Howanice:



David - What version of windchill are you running ? The DeleteRepUtil I'm running on 9.1 only allows deleting via list of OIDs, so we had to create some sql queries to firstfind the OIDs, then use the DeleteRepUtil.


Top Tags