cancel
Showing results for 
Search instead for 
Did you mean: 

How do I change the DDL generation scripts for SQL Server

Former Member
0 Kudos

I'm generating DDL for SQL Server and want to load extended properties into the database.  I checked off the "Comment" box on tables and columns in the Database Generation Options tab. I get this

execute sp_addextendedproperty 'MS_Description', 

   'Hierarchy of the Programs, Program Components balh, blah, blah.',

   'user', 'JAN', 'table', 'AH_PROGRAM_COMPONENT_CATEGORY'

go

Of course the 'user' value should be 'SCHEMA'.  If I edit it, it works fine. 

How do I get in behind the DDL generation instructions within PD to correct this permanently?

Regards,

Jane

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Ok.  Figured it out.  For the benefit of others reading this later, go to Tools --> Resources --> DBMS then choose SQL Server 20nn edit the script for Table Comment and Column Comment and View Comment.

Save the file.

Done.

JR

former_member182952
Active Participant
0 Kudos

Hi Jane,

You beat me to it.  I was just about to post the same.  Glad you figured it out.

Here's some additional info from Microsoft in relation to this on SQL Server 2008:

http://technet.microsoft.com/en-us/library/ms143729%28SQL.100%29.aspx

- Use Level0type = 'USER' only to add an extended property directly to a user or role.

- Use Level0type = 'SCHEMA' to add an extended property to level-1 types such as TABLE or VIEW, or level-2 types such as COLUMN or TRIGGER. For more information, see sp_addextendedproperty (Transact-SQL)

Adam

Answers (0)