Skip to Content

Querying the PD Repository

I need help; or, I need help finding help... I want to query my PD Repository database to answer questions about the "health" of our models. I have explored the Repository Data Model, but am struggling still. I want to answer questions like: Within a certain Repository folder, including sub-folders, within all current-version physical data models, how many tables have non-empty comments? (And, similarly, for columns.)


I've figured out bits and pieces - but only at the highest level, for example:

select count(*) from PMOBJT where CLSS=272 and cmmt<>0 and lvrs=1; -- number of latest version tables with a comment

What I have not figured out is how to determine how objects are related to each other - folders within folders, PDM's within folders, tables with PDMs, columns within PDMS.
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Jan 09 at 09:20 PM

    In the script you could check out the model in memory then navigate it in the usual way

    Add comment
    10|10000 characters needed characters exceeded

  • Jan 09 at 09:12 PM

    You might have seen this already, but there is a published metamodel that explains all of the relationships between the tables. I found this one:

    http://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.infocenter.dc38628.1600/doc/html/rad1232022065342.html.

    Look at the "MetaModel.oom" file. It should give you more help also.

    Add comment
    10|10000 characters needed characters exceeded