Discussion:
Reporting on PD15 repository
(too old to reply)
unknown
2009-10-22 02:49:05 UTC
Permalink
Help me query the PowerDesigner tables.

a colleague says one of his tables has gone from a model.

I know I can get it back from an older version of the model
but I am having trouble finding a version that it exists in.
Find objects only searches one version at a time - there are
182 versions of our model and I am not going to search one
by one.

I figure the best way is to query the PowerDesigner tables.
I am strugling to identify the right tables - yes I have
looked at the metamodel but ....

I see the records in PMOBJT that match the modelled table I
want, but how do I link this to the version of the model
(which seems to be in PMOLOG).

Is anyone prepared to share any queries they use that are
useful?

Thanks
unknown
2009-10-28 21:47:06 UTC
Permalink
Asking again ... Any ideas on this??
Mark Brady
2009-11-02 15:54:20 UTC
Permalink
Post by unknown
Asking again ... Any ideas on this??
I haven't been forced to delve into the raw repository data.

One idea is the way they used to find genes in long chromosome - a
binary search.


If there are 182 versions, you should first look at 91. If 91 has it,
you know it disappeared after that. If it doesn't, it has to have been
dropped prior.

Say it is in 91... Then check 136.... is or isn't...say isn't... check
113 say it is...


after 3 manual check, you've narrowed the search to versions 114-135.
Those 21 versions may only span a few days... or a few weeks, but
you'll have a min/max date to identify the disappearance. One more
check and you'll be down to 10 versions.
unknown
2009-11-03 20:19:31 UTC
Permalink
Great suggestion Mark - but it didn't help because the
tables only existed for a short while (between 16 sept 2009
22 sept 2009) and in the end it was in an entirely
different model.

Anyone who has this problem in the future, here is how I
sorted it out.
1. I queried table that contains a record for each version
of an object (PMOBJT) which is in the PowerDesigner
database. I looked for my table name in CODE
eg
Select * from dbo.PMOBJT WHERE CODE ='MYTABLE'
and Identified the dates it existed -
OCDT seems to be the date the object was created
OMDT seems to be the date the object was modified.
MDAT seems to be the date the model was created
CDAT seems to be the date the model was modified.

if you are not aware of this - when you check in PC does not
save a whole model as a complete document, it saves each
change, with the date done. When you check out a version of
a model it constructs the model from the changes valid for
it.

2. Menu Repository --> activities lists all the check ins
and outs and other actions on the repository - I filtered to
show check in's in the year and month (expression *September
2009*)
and found the model that was checked in about the same time
(it may be up to a couple of minutes after not before the
time the object was changed)

I recommend you don't filter by model unless you are sure
the object was actually in the model - in my case my
colleague was remembering the wrong model.

There must be a better way - I have logged a support call
with Sybase - but they have not come back to me.
Mark Brady
2009-11-04 16:54:17 UTC
Permalink
Post by unknown
Great suggestion Mark - but it didn't help because the
tables only existed for a short while (between 16 sept 2009
22 sept 2009)  and in the end it was in an entirely
different model.
Anyone who has this problem in the future, here is how I
sorted it out.
1. I queried table that contains a record for each version
of an object (PMOBJT) which is in the PowerDesigner
database. I looked for my table name in CODE
eg
    Select * from dbo.PMOBJT WHERE CODE ='MYTABLE'
and Identified the dates it existed -
OCDT seems to be the date the object was created
OMDT seems to be the date the object was modified.
MDAT seems to be the date the model was created
CDAT seems to be the date the model was modified.
if you are not aware of this - when you check in PC does not
save a whole model as a complete document, it saves each
change, with the date done.  When you check out a version of
a model it constructs the model from the changes valid for
it.
2.  Menu Repository --> activities lists all the check ins
and outs and other actions on the repository - I filtered to
show check in's in the year and month (expression *September
2009*)
and found the model that was checked in about the same time
(it may be up to a couple of minutes after not before the
time the object was changed)
I recommend you don't filter by model unless you are sure
the object was actually in the model - in my case my
colleague was remembering the wrong model.
There must be a better way - I have logged a support call
with Sybase - but they have not come back to me.
"if you are not aware of this - when you check in PC does not save a
whole model as a complete document, it saves each change, with the
date done. When you check out a version of a model it constructs the
model from the changes valid for it."

That's why there's a "Baseline" option on the check in window. That
will write all the objects again instead of just the deltas. This will
speed check out of a large model with lots of versions.

It's always frustrating when you're given bad information, which
forces you to run around until you work so long you stumble upon the
right answer by accident.

when you say, there must be a better way, you mean better way to what?
Just find an object across models?
unknown
2009-11-18 02:25:27 UTC
Permalink
Mark Said ....
Post by Mark Brady
"if you are not aware of this - when you check in PC does
not save a whole model as a complete document, it saves
each change, with the date done. When you check out a
version of a model it constructs the model from the
changes valid for it."
That's why there's a "Baseline" option on the check in
window. That will write all the objects again instead of
just the deltas. This will speed check out of a large
model with lots of versions.
Yes I understand that - I set baselines when we do a
production release.
Post by Mark Brady
It's always frustrating when you're given bad information,
which forces you to run around until you work so long you
stumble upon the right answer by accident.
when you say, there must be a better way, you mean better
way to what? Just find an object across models?
If you are fishing for ways to improve the product - yes,
being able to use "find objects" on all versions of a model
would have solved this problem - it would have needed to
show the version added and version removed to be really
useful.

Find objects already lets you search across the current
version of all models.

but what I was really grumbling about was my being refused
the information on how the data is physically persisted. The
relationships between a version of a model, and the objects
that are associated with it must be stored in the database.
I would have saved a lot of time and effort if that
information were available.
unknown
2009-10-28 21:47:06 UTC
Permalink
Asking again ... Any ideas on this??
c***@gmail.com
2012-12-05 18:27:43 UTC
Permalink
Post by unknown
Help me query the PowerDesigner tables.
a colleague says one of his tables has gone from a model.
I know I can get it back from an older version of the model
but I am having trouble finding a version that it exists in.
Find objects only searches one version at a time - there are
182 versions of our model and I am not going to search one
by one.
I figure the best way is to query the PowerDesigner tables.
I am strugling to identify the right tables - yes I have
looked at the metamodel but ....
I see the records in PMOBJT that match the modelled table I
want, but how do I link this to the version of the model
(which seems to be in PMOLOG).
Is anyone prepared to share any queries they use that are
useful?
Thanks
You will find this pdf usefull http://download.sybase.com/presentation/TW2005/DEV403.pdf
Continue reading on narkive:
Loading...