Description:
When Forward Engineering from a Model with SQL Server as target database, I do not see any syntax for Table and/or Column Comments. Is it doable, if yes how?
Solution:
Yes, SQL Server does support Table and Column Comments and Forward Engeering from erwin DM also generates the needed syntax. However, SQL Server supports it as an Extended Property which requires a few fields to be populated, namely Schema for the Table. To add a Comment for Tables and/or Columns for SQL Server, you can follow the steps below.
Steps:
1 Add the Schema Owner for the Table(s) as follows:
Go to the Table and right-click on Table Properties.
Make sure the Table has a Schema Owner.
2. Tables and/or Columns, add the 'Comment' as needed.
Go to the ‘Comment’ tab -> select ‘Edit’ enter the 'Comment' and select ‘OK’
If you do not add the Schema Owner the Comments will not be created/generated using Forward Engineering as that is a required field for creating the 'Comments' in SQL Server. Please see the example in Table B where a Comment is added but that Table does not have a Schema Owner.
3. In Forward Engineering | Schema | Option Selection | Other Options, select the option to create the Comment.
Here is the syntax for both Tables, Table_A and Table_B. The Comment is created only for Table_A as it had the Schema Owner, but not for Table_B as it did not.
© ALL RIGHTS RESERVED. Terms of Use Privacy Cookie Preference Center