Skip to Content
0

Powerdesigner reverse engineer - SQL Server 2012 - Skipping lines

Sep 29, 2017 at 10:57 PM

111

avatar image
Former Member

I'm trying to load a physical model into PowerDesigner 16.6 from a DDL script (SQL Server 2012) using reverse engineering, but some lines are skipped.

An example of skipped line is:

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'CODIGO SEQUENCIAL DA PESSOA ESCALADA NA FUNCAO' , @level0type=N'SCHEMA',@level0name=N'ECOA', @level1type=N'TABLE',@level1name=N'VOOS_PESSOAS_SUBDOMINIOS', @level2type=N'COLUMN',@level2name=N'VOPS_CD'

The same occurs to lines like this:

ALTER TABLE [ECOA].[ABORTIVAS] CHECK CONSTRAINT [CK_ABORTIVAS_SOLO]

Any ideas?

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

George McGeachie Oct 06, 2017 at 10:54 AM
0

I don't profess to be an expert of SQL Server, so I can't comment on why PowerDesigner doesn't like your DDL (Data Definition Language), but I can help you understand what's happening. :)

When you reverse-engineer from a database, PowerDesigner compares the DDL it receives from the DBMS with the templates held in the Database Definition file. If a line or section doesn't match a template, it doesn't know what to do with it, so it gets skipped.

Here is the template for the Table Alter statement for adding a check constraint:

alter table [%QUALIFIER%]%TABLE%[%R%?[ with nocheck][ with check]]
add [constraint %CONSTNAME% ]check [%ExtCktNotForReplication%?not for replication ](%.A:CONSTRAINT%)

You can see these templates in the Database definition, but make sure you don't save any changes, unless you want them to affect other SQL Server 2012 models

  • go to "Edit Current DBMS" in the "Database" menu
  • expand Script, then Objects, then Table
  • select DefineTableCheck

If you want the process to work smoothly, you have two options:

  • change the DDL syntax to match PowerDesigner's expectation
  • change the template in PowerDesigner

If I were you I'd change the DDL.

If you want to see sample PowerDesigner DDL for your DBMS, find or create a model with the appropriate types of objects in it, then look at the Preview tab on tables, views etc, or on the model.

Share
10 |10000 characters needed characters left characters exceeded