As part of an upgrade/data-model conversion we have going on where I work, the application engineers from Siemens asked us if we had a way of inventorying Teamcenter so we could know how many items of each item type we have. So I came up with the following SQL query:
SQL Query for Inventorying Teamcenter
SELECT w.pobject_type, COUNT(*) FROM pitem i, pworkspaceobject w WHERE i.puid = w.puid GROUP BY w.pobject_type ORDER BY w.pobject_type ;
I ran this against a Teamcenter Engineering 2007 system running on Oracle. I can’t promise that it’ll work for Teamcenter 8, but I expect it will — if you try it, please let me know your results in the comments below. If you’re not on Oracle you may need to adjust the SQL a bit.
It should be easy to modify the query to inventory other types of objects, for example dataset types, by selecting from a different table besides pitem.
By the way, if you are using Oracle I recommend SQL Developer, which is a free download from Oracle.