cancel
Showing results for 
Search instead for 
Did you mean: 
Subscribe

Hello all,

Sorry in advance if this basic question has already been asked. I have had a look at the forums first, as well as the documentation, without finding the answer I am looking for.

I am new to PowerDesigner 16.5, currently testing the reverse engineering function with a SQL Server 2012 database

I am trying to find how to import the table extended properties that were applied to the sql server tables (sp_addextendedproperties)

If it has already been imported with the reverse engineering default options, I can't see it anywhere in the resulting diagram.

Thank you in advance for your help

0 Likes
View Entire Topic
GeorgeMcGeachie
Active Contributor
0 Likes

With that small clue, I was able to find the places to configure reverse-engineering.

In the database definition file for SQL Server 2014, look in the section Script - Objects - Table - SqlListQuery

It contains the following code, which you could probably configure:

{OWNER, TABLE, TABLE_TYPE, COMMENT}

select

   u.name,

   o.name,

   case (o.type) when 'S' then 'SYSTEM TABLE' else 'TABLE' end,

   convert(varchar(8000), p.value)

from

   [%CATALOG%.]sys.sysobjects o

   join [%CATALOG%.]sys.schemas  u on (u.schema_id = o.uid)

left outer join [%CATALOG%.]sys.extended_properties p on (p.major_id = o.id and p.minor_id = 0 and p.name = 'MS_Description')

where

   o.type in ('U', 'S')

[  and u.name = %.q:OWNER%]

order by 1, 2

There's also mention of it in TableComment and ColumnComment, and in the View section - you can use the 'Find in Items' tool on the toolbar to find references to MS_Description.

Former Member
0 Likes

Thank you George for your answer and your time.

I will have a look at it today, and will try to configure the reverse engineering the way you described.

I will send you an update with the results I have obtained, whatever they are.

Thanks again for your precious help. Have a good day!!!

Thierry