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

Expand WinDU to detect corrupt links in Windchilil database

Expand WinDU to detect corrupt links in Windchilil database

This enhancement request is to expand WinDU capability to detect corrupted links in the database for WinRU to fix them. Our production Windchill system has WTPartUsageLinks referencing EPMDocumentBuildRules which do not exist in the system. These WTPartUsageLinks are connected to a part which is causing the TDP/STAMP zip failures.

 

The SQL below will list all Parts that have a WTPartUsageLink that refers to a CADDocument that owns the linkage...that doesnt exist.  This seems to be the root cause of this particular problem.

 

select pm.wtpartnumber, p.VERSIONIDA2VERSIONINFO, p.ITERATIONIDA2ITERATIONINFO, 'WTPartUsageLinks Reference EPMDocumentMaster or ModelItemMaster that does not exist'

from windchill.wtpartmaster pm, windchill.wtpart p

where pm.ida2a2 = p.IDA3MASTERREFERENCE

and p.ida2a2 in

    (select b.ida3a5

    from windchill.wtpartusagelink b left join windchill.MODELITEMMASTER c on b.UNIQUEIDSOURCEIDENTIFICATION = c.ida2a2

    where c.ida2a2 is null

    and b.ida2a2 in

        (select b.ida2a2

        from windchill.wtpartusagelink b left join windchill.epmdocumentmaster c on b.UNIQUEIDSOURCEIDENTIFICATION = c.ida2a2

        where b.UNIQUEIDSOURCEIDENTIFICATION is not null

        and c.ida2a2 is null));