How to Create a Forward Engineer Script with User Defined Extended Properties for SQL Server. For example...
EXEC sys.sp_addextendedproperty @name=N'WITRSDataObjectId',
@value=N'6923972' ,
...
go
Steps:
Here are the steps to generate a create script with User Defined Extended Properties for tables and columns in SQL Server:
- Right click on a table name (in either the diagram or Model Explorer) and click Table Properties. Ensure that a schema has been assigned to the table:
- In the same Table Properties, menu select UDP Tab and create a new UDP.
- Select either Table or Column level and click the new icon:
- Enter the Name for the Extended Property and optionally set a default value. Also Make sure the box "Is Database Property" is checked (selected) when creating the UDP, for either Table or Column level. Then click close.
- The value for the upd can also be edited in the Table Properties on the UDP tab.
- Finally, when Forward Engineering (under the Actions menu), please make sure select the box "User Defined Properties" under Option Selection then Other Options window.
- Click Preview to review the results.
Comments
0 comments
Please sign in to leave a comment.