Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

PDM doesn't generate Foreign Keys for SQL Server 2008

553 views
Skip to first unread message

BrentM

unread,
Mar 24, 2009, 5:01:32 AM3/24/09
to
Hello,

When generating a PDM from A LDM, the Foreign Keys are not
generated... only the indexes. Is there a setting that must
be turned on for this?

I'm generating a PDM for MS SQL Server 2008

cheers,
Brent.

BrentM

unread,
Mar 24, 2009, 4:48:32 PM3/24/09
to

I've found the reason for this... and it looks like a BUG.

The SQL2008 PDM only accepts Trigger and not Declarative on
the Integrity tab of the reference properties. This is not
the case for SQL2000 or SQL2005.

David Dichmann

unread,
Mar 26, 2009, 3:19:48 AM3/26/09
to
Brent,

I've peeked into the database definition, seems "Restrict" is not set as a
viable update/delete option ofr integrity constraints. First try changing
one to Cascade/Cascade and see if Declarative is now permitted. You cna
also use the None/None settings for the moment - it will do the same as
restrict/restrict.

If you are brave, you cna also try Database, Edit Current DBMS, and look for
the Script, Objects, Reference, DclUpdIntegrity and DclDelIntegrity keys,
and add the word RESTRICT in a line by itself just after the line NO ACTION.
The list will now look like:

NO ACTION
RESTRICT
CASCADE
SET NULL
SET DEFAULT

which will allow setting of restrict/restrict in the UI to be set to
declarative now.

Hope that helps.

David Dichmann
Sr. Product Manager, PowerDesigner


randy.buchholz

unread,
Mar 27, 2009, 4:30:48 PM3/27/09
to
I've run into this too. I did find a work around by playing with it a
little, but I can't recall right now. It didn't take long to figure out. I
didn't have problems starting fresh with declarative, but when I reversed a
database with trigger integrity it was a pain converting to DRI.

"David Dichmann" <dic...@sybase.com> wrote in message
news:49cb2c94@forums-1-dub...

David Dichmann

unread,
Mar 29, 2009, 11:52:47 AM3/29/09
to
Randy,

It is true, if you have only triggers for integrity, we do not parse the
trigger looking for the type of integrity it will provide. There are so
many ways to do this, there is no clean way to make the right assumption.
So - if we find a constraint, we can query the RDBMS catalog for the
integrity rules set on it, if we find a trigger, we can capture the trigger,
but we cannot easily "ask" the trigger what kind of integrity rule is being
managed.

If you have ideas how we could support that, please feel free to propose
them. I am sure there are some tricks we could use.

Thanks,
David Dichmann,
Sr. Product Manager, PowerDesigner
Sybase, Inc.


BrentM

unread,
Mar 29, 2009, 7:07:14 PM3/29/09
to

Thanks Dave.

I edited the DBMS Properties as you've recommended and that
works fine now :-)

Beautiful!

cheers.

0 new messages