none
Scripting Objects - Extended Properties Best Practice? RRS feed

  • Question

  • Fellow SQLers,

    I am curious if there is a best practice on this.

    I am going to be scriptiong out selected objects from a SQL db - tables, sp, views, and a few other things. In the Advanced window of the Generate Script gui, there is "Script Extended Properties".  Is this a recommended option to have as True?

    Thanks,

    MG

    Monday, June 3, 2019 11:31 PM

Answers

  • Whether extended properties should be included in scripting depends entirely on your use case. There is no best practice one way or another. 

    If you use extended properties and your purpose for scripting is to run the scripts in another database that should have the same meta-data, you'll obviously want to specify true. Conversely, you might not want to include them if you are scripting from a dev database where extended properties are used only for development notes and not needed outside of the dev database.


    Dan Guzman, Data Platform MVP, http://www.dbdelta.com

    • Marked as answer by mg101 Tuesday, June 4, 2019 10:52 AM
    Tuesday, June 4, 2019 12:32 AM

All replies

  • Whether extended properties should be included in scripting depends entirely on your use case. There is no best practice one way or another. 

    If you use extended properties and your purpose for scripting is to run the scripts in another database that should have the same meta-data, you'll obviously want to specify true. Conversely, you might not want to include them if you are scripting from a dev database where extended properties are used only for development notes and not needed outside of the dev database.


    Dan Guzman, Data Platform MVP, http://www.dbdelta.com

    • Marked as answer by mg101 Tuesday, June 4, 2019 10:52 AM
    Tuesday, June 4, 2019 12:32 AM
  • Hi mg101,

     

    Welcome to SQL ServerTransact-SQL.

     

    SQL Server can store a large volume of data in relational formats which is great for the business, but business users and developers also have needs to store documentation and information related to the SQL Server objects. One way to do this is to use Extended Properties which allows you to save information about the objects such as what it's for, specific formats like phone format, date format, description of objects, URLs, website links and so on. In following article it will show how we can add Extended Properties.

     

    Please refer to it .Working with SQL Server Extended Properties

     

    Best Regards,

    Rachel


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Tuesday, June 4, 2019 2:01 AM
  • Thanks Dan

    MG

    Tuesday, June 4, 2019 10:52 AM